Client-Side Tools Technical Documentation
Specifications and function signatures for client-side JavaScript utilities.
Architecture Overview
All tools on BestSaaSSEOAgency execute 100% in the client's web browser using vanilla ECMAScript 6+. No server requests, no node dependencies, and zero database lookups.
1. Meta Title & Description Checker API
/**
* Calculates character length, pixel width, and truncation status for title/description tags.
* @param {string} text - Title or description string
* @param {string} type - 'title' (max 60 chars) or 'description' (max 160 chars)
* @returns {Object} { length, pxWidth, isTruncated, status }
*/
function analyzeMetaTag(text, type) { ... }
2. Schema Markup Generator API
/**
* Constructs JSON-LD structured data payload.
* @param {string} schemaType - 'Organization' | 'Article' | 'FAQPage' | 'LocalBusiness' | 'SoftwareApplication'
* @param {Object} data - Input values
* @returns {string} Formatted JSON-LD script tag
*/
function generateJSONLD(schemaType, data) { ... }
3. Word Counter & Readability API
/**
* Computes word count, character count, sentence count, reading time, and readability grade.
* @param {string} content - Raw article text
* @returns {Object} { words, chars, sentences, readingTimeMin, grade }
*/
function computeWordMetrics(content) { ... }
4. Keyword Density Analysis API
/**
* Extracts 1-word, 2-word, and 3-word n-grams and computes density percentages excluding stop words.
* @param {string} text - Input text content
* @returns {Array<Object>} Sorted array of { phrase, count, density }
*/
function analyzeKeywordDensity(text) { ... }