@f-o-t/content-analysis 1.0.3 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bad-patterns.d.ts +10 -0
- package/dist/bad-patterns.d.ts.map +1 -0
- package/dist/index-9t11m1re.js +3 -0
- package/dist/index-9t11m1re.js.map +9 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1038 -0
- package/dist/index.js.map +17 -0
- package/dist/keywords.d.ts +10 -0
- package/dist/keywords.d.ts.map +1 -0
- package/dist/markdown.d.ts +20 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/plugins/types/index.d.ts +154 -0
- package/dist/plugins/types/index.d.ts.map +1 -0
- package/dist/plugins/types/index.js +4 -0
- package/dist/plugins/types/index.js.map +9 -0
- package/dist/readability.d.ts +10 -0
- package/dist/readability.d.ts.map +1 -0
- package/dist/seo.d.ts +10 -0
- package/dist/seo.d.ts.map +1 -0
- package/dist/structure.d.ts +10 -0
- package/dist/structure.d.ts.map +1 -0
- package/dist/utils.d.ts +59 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +38 -37
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bad Pattern Detection Module
|
|
3
|
+
* Detects problematic content patterns that hurt quality and SEO
|
|
4
|
+
*/
|
|
5
|
+
import type { BadPatternResult } from "./plugins/types/index";
|
|
6
|
+
/**
|
|
7
|
+
* Analyze content for bad patterns
|
|
8
|
+
*/
|
|
9
|
+
export declare function analyzeBadPatterns(content: string, title?: string): BadPatternResult;
|
|
10
|
+
//# sourceMappingURL=bad-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-patterns.d.ts","sourceRoot":"","sources":["../src/bad-patterns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAc,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG1E;;GAEG;AACH,wBAAgB,kBAAkB,CAC/B,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACd,gBAAgB,CAsOlB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content Analysis Library
|
|
3
|
+
*
|
|
4
|
+
* A comprehensive library for analyzing content quality, SEO optimization,
|
|
5
|
+
* readability, structure, and detecting problematic patterns.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { analyzeBadPatterns } from "./bad-patterns";
|
|
10
|
+
export { analyzeKeywords } from "./keywords";
|
|
11
|
+
export { analyzeReadability } from "./readability";
|
|
12
|
+
export { analyzeSeo } from "./seo";
|
|
13
|
+
export { analyzeStructure } from "./structure";
|
|
14
|
+
export * from "./plugins/types/index";
|
|
15
|
+
export { calculateFleschKincaid, clampScore, countSyllables, extractHeadings, extractParagraphs, extractWords, findOccurrences, getReadabilityLevel, hasConclusionSection, hasQuickAnswerPattern, } from "./utils";
|
|
16
|
+
import type { AnalysisInput, ContentAnalysisResult } from "./plugins/types/index";
|
|
17
|
+
/**
|
|
18
|
+
* Perform a comprehensive content analysis
|
|
19
|
+
*
|
|
20
|
+
* This function runs all available analyzers and returns a combined result:
|
|
21
|
+
* - SEO analysis (title, meta, keywords, structure)
|
|
22
|
+
* - Readability analysis (Flesch-Kincaid scores)
|
|
23
|
+
* - Structure analysis (headings, paragraphs, quick answers)
|
|
24
|
+
* - Bad pattern detection (filler phrases, clickbait, etc.)
|
|
25
|
+
* - Keyword analysis (density, placement, recommendations)
|
|
26
|
+
*
|
|
27
|
+
* @param input - The content and metadata to analyze
|
|
28
|
+
* @returns Combined analysis results from all analyzers
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* import { analyzeContent } from '@f-o-t/content-analysis';
|
|
33
|
+
*
|
|
34
|
+
* const result = analyzeContent({
|
|
35
|
+
* content: '## Introduction\n\nThis is my blog post...',
|
|
36
|
+
* title: 'My Blog Post Title',
|
|
37
|
+
* description: 'A short description for SEO',
|
|
38
|
+
* targetKeywords: ['blog', 'tutorial'],
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* console.log(result.seo.score); // 85
|
|
42
|
+
* console.log(result.readability.fleschKincaidReadingEase); // 65.2
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function analyzeContent(input: AnalysisInput): ContentAnalysisResult;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EACJ,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACvB,MAAM,SAAS,CAAC;AAQjB,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,qBAAqB,CA2B1E"}
|