rectify
v0.1.0
Published
Unsmarten your quotes, dashes, and ellipses.
Downloads
20
Maintainers
Readme
Rectify.js
Unsmarten your quotes, dashes, and ellipses.
Usage
rectify('“Who’s on first?”'); //=> '"Who\'s on first?"'
The mapping from smart to raw is as follows:
‘ => '
’ => '
“ => "
” => "
– => --
— => ---
… => ...
API
rectify(str)
Returns the str
with quotes, dashes, and ellipses replaced with their raw equivalents.
Installation
Install via npm:
$ npm i --save rectify