Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

string-apostrophes

Package Overview
Dependencies
1
Maintainers
1
Versions
71
Issues
File Explorer

Advanced tools

string-apostrophes

Comprehensive, HTML-entities-aware tool to typographically-correct the apostrophes and single/double quotes

    3.0.1latest

Version published
Maintainers
1
Yearly downloads
5,080
increased by6.25%

Weekly downloads

Readme

Source

string-apostrophes

Comprehensive, HTML-entities-aware tool to typographically-correct the apostrophes and single/double quotes

page on npm page on codsen.com page on github Downloads per month Code style: prettier MIT License libera manifesto

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 1.5.0 (npm i [email protected]).

npm i string-apostrophes

Quick Take

import { strict as assert } from "assert"; import { convertOne, convertAll } from "string-apostrophes"; assert.deepEqual( convertAll(`In the '60s, rock 'n' roll`, { convertApostrophes: true, convertEntities: false, }), { result: "In the ’60s, rock ’n’ roll", ranges: [ [7, 8, "’"], [18, 21, "’n’"], ], } ); assert.deepEqual( convertOne(`test's`, { from: 4, to: 5, convertApostrophes: true, convertEntities: true, }), [[4, 5, "’"]] );

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 (c) 2010-2022 Roy Revelt and other contributors

ok codsen star

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc