1.2.13 • Published 1 month ago

string-dashes v1.2.13

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Install

This package is pure ESM.

npm i string-dashes

Quick Take

import { strict as assert } from "assert";

import { convertOne, convertAll } from "string-dashes";

assert.deepEqual(
  convertAll("Dashes come in two sizes - the en dash and the em dash.", {
    convertDashes: true,
    convertEntities: true,
  }),
  {
    result: "Dashes come in two sizes — the en dash and the em dash.",
    ranges: [[25, 26, "—"]],
  },
);

assert.deepEqual(
  convertOne("Dashes come in two sizes - the en dash and the em dash.", {
    from: 25,
    convertDashes: true,
    convertEntities: true,
  }),
  [[25, 26, "—"]],
);

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.

1.2.13

1 month ago

1.2.12

3 months ago

1.2.11

4 months ago

1.2.10

4 months ago

1.2.8

10 months ago

1.2.7

12 months ago

1.2.9

8 months ago

1.2.6

12 months ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago