typographic-apostrophes
Micro module to help eliminate one of the bad typewriter habits.
Install
npm install --save typographic-apostrophes
Usage
Use typographic apostrophes in contractions and for possessive case. This module don't cover posessive plurals, because it’s impossible to distinguish it from single closing quote.
That's why I created typographic-apostrophes-for-possessive-plurals, but it can be used safely only if there are zero closing quotes in the input; this can be achieved by typographic-quotes. That’s why for ideal result you should use all three modules in the chain: apostrophes → quotes → apostrophes-for-possessive-plurals
(order is important).
var apostrophes = ; ; // I’m looking forward; // Don’t do it!; // as in the eagle’s feathers; // in one month’s time; // ’60s and ’80s; // rock’n’roll; // rock ’n’ roll
Real world examples
Check complex usage with real world examples in typography playground.
License
MIT © Vladimir Starkov