to-single-quotes
v4.0.0
Published
Convert matching double-quotes to single-quotes: `I "love" unicorns` → `I 'love' unicorns`
Downloads
255,975
Maintainers
Readme
to-single-quotes
Convert matching double-quotes to single-quotes:
I "love" unicorns
→I 'love' unicorns
Install
$ npm install to-single-quotes
Usage
import toSingleQuotes from 'to-single-quotes';
toSingleQuotes('I love "unicorns" \'and\' "ponies"');
//=> "I love 'unicorns' 'and' 'ponies'"
Related
- to-single-quotes-cli - CLI for this module
- to-double-quotes - Convert matching single-quotes to double-quotes