{"_id":"@davidcelis/retext-smartypants","name":"@davidcelis/retext-smartypants","dist-tags":{"latest":"5.3.0"},"versions":{"5.3.0":{"name":"@davidcelis/retext-smartypants","version":"5.3.0","description":"retext plugin to implement SmartyPants","license":"MIT","keywords":["unified","retext","retext-plugin","smartypants","typography","quotes","dashes","ellipses"],"repository":{"type":"git","url":"git+https://github.com/davidcelis/retext-smartypants.git"},"bugs":{"url":"https://github.com/davidcelis/retext-smartypants/issues"},"author":{"name":"David Celis","email":"me@davidcel.is","url":"https://davidcel.is"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"David Celis","email":"me@davidcel.is","url":"https://davidcel.is"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/nlcst":"^1.0.0","nlcst-to-string":"^3.0.0","unified":"^10.0.0","unist-util-visit":"^4.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","retext":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.50.0"},"scripts":{"build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"f8d40236e1a9bca42def925fac1f8b020a364e7d","homepage":"https://github.com/davidcelis/retext-smartypants#readme","_id":"@davidcelis/retext-smartypants@5.3.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ulLdMcWPPO6qfp0op/JZZdlq/AVELs2JeT/v1zf8DMiOxJ53nvDdFDG3XyyMYfEB6vjrPDJPTH1X6sUdN2t2Vw==","shasum":"fed14f28db62f279c3bd8391d4be067eebe43bfa","tarball":"https://registry.npmjs.org/@davidcelis/retext-smartypants/-/retext-smartypants-5.3.0.tgz","fileCount":5,"unpackedSize":21658,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4vg8Fum4SZ50/PYhD0qtM41Xed6f8Nj2CvAykhyXzNAiAgfjnUNbwUKGrecGRFwi1w0165Arx/Q5omNOCrTFc/zg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3psVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+kRAAi72Urnl9x8dxsKRFRCeZDzyMkY2kCObqSGFm9oPG6f8qdFGZ\r\nmavEfR3Vz9exhzdGXGDdZr6KubVBNr6ZHp7GibH2q+qTi5i0nt3XH2oMv9kB\r\nDgZvep0cckqsZ4tF+iVCGzAHF+K2WtG99SVpTWtIloMxDgaOcFbHJTUJJ9k7\r\nXLUfJrK1chFDS7bFzcbWovTFzu19SM0H2Lm2IWnSoiI6YJgbS2zkDu9BHY8n\r\nkVoA2x661vseL6L7Y2ru/H94qJNj7/FfdbGiSyhUMuQdxHkzfN3KXhpbVzSc\r\nfOzVoj1tQshN+6Wp3eDZSaZRjxhmhOI2KdqN0TMTzdW42YVcBMCJ3xc0aMEg\r\nr/teDOUwRh8/hzLvfmFpzQDDfhSLdURqh8EVryKPw6UQK4g0ycusOSYAxXld\r\natRDiNKJX0L+vuPzQoho7OhYYpxnRDRjh4kwMEIvcn54OUi5/i9Xtp8XDUf4\r\nnP6LNouJRXKxZA3jP0/z+WbEh7+F7R6ovVpxQYPavsVbbE/IK/vyOxSZorcC\r\nBKA8E1kgD901QGTqyhb2hnpbdwX/cW7AX1ykCHE580qaHgUjjaVts/FEFax5\r\n29jzTxF+m8OQiai4px7SCaGRBSBfP3srnpnzMsI8GcOB4GiIe31xcB1PQVxl\r\nmVDiYVb097qpzWBtasmMecNvqdUSmVP6EbU=\r\n=eK7f\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"davidcelis","email":"me@davidcel.is"},"directories":{},"maintainers":[{"name":"davidcelis","email":"me@davidcel.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/retext-smartypants_5.3.0_1675533077545_0.34320232440624676"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-04T17:51:17.480Z","5.3.0":"2023-02-04T17:51:17.674Z","modified":"2023-02-04T17:51:17.811Z"},"maintainers":[{"name":"davidcelis","email":"me@davidcel.is"}],"description":"retext plugin to implement SmartyPants","homepage":"https://github.com/davidcelis/retext-smartypants#readme","keywords":["unified","retext","retext-plugin","smartypants","typography","quotes","dashes","ellipses"],"repository":{"type":"git","url":"git+https://github.com/davidcelis/retext-smartypants.git"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"David Celis","email":"me@davidcel.is","url":"https://davidcel.is"}],"author":{"name":"David Celis","email":"me@davidcel.is","url":"https://davidcel.is"},"bugs":{"url":"https://github.com/davidcelis/retext-smartypants/issues"},"license":"MIT","readme":"# retext-smartypants\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[retext][]** plugin to apply [SmartyPants][].\n\n## Contents\n\n- [retext-smartypants](#retext-smartypants)\n  - [Contents](#contents)\n  - [What is this?](#what-is-this)\n  - [When should I use this?](#when-should-i-use-this)\n  - [Install](#install)\n  - [Use](#use)\n  - [API](#api)\n    - [`unified().use(retextSmartypants[, options])`](#unifieduseretextsmartypants-options)\n        - [`options`](#options)\n          - [`options.quotes`](#optionsquotes)\n          - [`options.openingQuotes`](#optionsopeningquotes)\n          - [`options.closingQuotes`](#optionsclosingquotes)\n          - [`options.ellipses`](#optionsellipses)\n          - [`options.backticks`](#optionsbackticks)\n          - [`options.dashes`](#optionsdashes)\n  - [Types](#types)\n  - [Compatibility](#compatibility)\n  - [Contribute](#contribute)\n  - [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([retext][]) plugin to apply [SmartyPants][] to\nthe syntax tree.\nIt replaces straight/typewriter punctuation marks and symbols with smart/curly\nmarks and symbols.\n\n## When should I use this?\n\nYou can use this plugin any time there straight marks and symbols in prose,\nbut you want to use smart ones instead.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 12.20+, 14.14+, 16.0+, or 18.0+), install with [npm][]:\n\n```sh\nnpm install retext-smartypants\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport retextSmartypants from 'https://esm.sh/retext-smartypants@5'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import retextSmartypants from 'https://esm.sh/retext-smartypants@5?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {retext} from 'retext'\nimport retextSmartypants from 'retext-smartypants'\n\nconst file = await retext()\n  .use(retextSmartypants)\n  .process('He said, \"A \\'simple\\' english sentence. . .\"')\n\nconsole.log(String(file))\n```\n\nYields:\n\n```txt\nHe said, “A ‘simple’ english sentence…”\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is `retextSmartypants`.\n\n### `unified().use(retextSmartypants[, options])`\n\nApply [SmartyPants][].\n\n##### `options`\n\nConfiguration (optional).\n\n###### `options.quotes`\n\nCreate smart quotes (`boolean`, default: `true`).\n\nConverts straight double and single quotes to smart double or single quotes.\nThe options `options.openingQuotes` and `options.closingQuotes` affect which\nquotes are considered smart.\n\n###### `options.openingQuotes`\n\nCharacters to use for opening quotes `{single: '‘', double: '“'}`.\n\n###### `options.closingQuotes`\n\nCharacters to use for closing quotes `{single: '’', double: '”'}`.\n\n###### `options.ellipses`\n\nCreate smart ellipses (`boolean`, default: `true`).\n\nConverts triple dot characters into a single unicode ellipsis character.\n\n###### `options.backticks`\n\nCreate smart quotes from backticks (`boolean` or `'all'`, default: `true`).\n\nWhen `true`, converts double backticks into an opening double quote, and\ndouble straight single quotes into a closing double quote.\n\nWhen `'all'`: does the what `true` does with the addition of converting single\nbackticks into an opening single quote, and a straight single quote into a\nclosing single smart quote.\n\n> 👉 **Note**: `options.quotes` can not be `true` when `backticks` is `'all'`.\n\n###### `options.dashes`\n\nCreate smart dashes (`boolean` or `'oldschool'`, `'inverted'`, default: `true`).\n\nWhen `true`, converts two dashes into an em dash character.\n\nWhen `'oldschool'`, converts two dashes into an en dash, and three dashes into\nan em dash.\n\nWhen `'inverted'`, converts two dashes into an em dash, and three dashes into\nan en dash.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types `Options` and `QuoteCharacterMap`.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with all maintained\nversions of Node.js.\nAs of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+.\nOur projects sometimes work with older versions, but this is not guaranteed.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/retextjs/retext-smartypants/workflows/main/badge.svg\n\n[build]: https://github.com/retextjs/retext-smartypants/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-smartypants.svg\n\n[coverage]: https://codecov.io/github/retextjs/retext-smartypants\n\n[downloads-badge]: https://img.shields.io/npm/dm/retext-smartypants.svg\n\n[downloads]: https://www.npmjs.com/package/retext-smartypants\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/retext-smartypants.svg\n\n[size]: https://bundlephobia.com/result?p=retext-smartypants\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/retextjs/retext/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[health]: https://github.com/retextjs/.github\n\n[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/retextjs/.github/blob/main/support.md\n\n[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[unified]: https://github.com/unifiedjs/unified\n\n[retext]: https://github.com/retextjs/retext\n\n[smartypants]: https://daringfireball.net/projects/smartypants\n","readmeFilename":"readme.md"}