1.2.13 • Published 8 months ago

string-dashes v1.2.13

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months 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

8 months ago

1.2.12

10 months ago

1.2.11

11 months ago

1.2.10

11 months ago

1.2.8

1 year ago

1.2.7

2 years ago

1.2.9

1 year ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago