2.0.8 • Published 2 years ago

seo-editor v2.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.9

3 years ago

1.4.11

3 years ago

1.4.8

3 years ago

1.4.10

3 years ago

1.4.7

3 years ago

1.4.13

3 years ago

1.4.12

3 years ago

1.4.15

3 years ago

1.4.14

3 years ago

1.4.16

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago