to-single-quotes

Convert matching double-quotes to single-quotes: I "love" unicorns → I 'love' unicorns

to-single-quotes

Convert matching double-quotes to single-quotes: I "love" unicornsI 'love' unicorns

$ npm install --save to-single-quotes
const toSingleQuotes = require('to-single-quotes');
 
toSingleQuotes('I love "unicorns" \'and\' "ponies"');
//=> "I love 'unicorns' 'and' 'ponies'" 

MIT © Sindre Sorhus