seo-editor
v2.0.8
Published
Copywriting keyword to-do list automation
Downloads
70
Maintainers
Readme
Install
This package is pure ESM.
npm i seo-editor
Quick Take
import { strict as assert } from "assert";
import { editor, version } from "seo-editor";
// Powers the UI of codsen.com/tools/seo-editor
// there's also a non-deterministic "log" key containing calculation statistics
const { todoLines, todoTotal, completion, chunkWordCounts } = editor(
`
- apple
- banana
- cucumber
`,
`
I ate a banana and a cucumber.
`,
);
assert.deepEqual(
{ todoLines, todoTotal, completion, chunkWordCounts },
{
todoLines: [
{ extracted: "", counts: [], length: 0, lengthCompensation: 0 },
{ extracted: "apple", counts: [0], length: 5, lengthCompensation: 3 },
{ extracted: "banana", counts: [1], length: 6, lengthCompensation: 2 },
{
extracted: "cucumber",
counts: [1],
length: 8,
lengthCompensation: 0,
},
{ extracted: "", counts: [], length: 0, lengthCompensation: 0 },
],
todoTotal: 3,
completion: [2],
chunkWordCounts: [7],
},
);
Documentation
Please visit codsen.com for a full description of the API.
Contributing
To report bugs or request features or assistance, raise an issue on GitHub.
Licence
MIT License.
Copyright © 2010-2024 Roy Revelt and other contributors.