sindresorhus / To Single Quotes
Licence: mit
Convert matching double-quotes to single-quotes: `I "love" unicorns` → `I 'love' unicorns`
Stars: ✭ 43
Programming Languages
javascript
184084 projects - #8 most used programming language
to-single-quotes
Convert matching double-quotes to single-quotes:
I "love" unicorns
→I 'love' unicorns
Install
$ npm install --save to-single-quotes
Usage
const toSingleQuotes = require('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
License
MIT © Sindre Sorhus
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].