to-single-quotes-shahata

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" unicorns => I 'love' unicorns

See to-double-quotes for the inverse.

Download manually or with a package-manager.

$ npm install --save to-single-quotes
$ bower install --save to-single-quotes
$ component install sindresorhus/to-single-quotes
var toSingleQuotes = require('to-single-quotes');
<script src="bower_components/to-single-quotes/to-single-quotes.js"></script>
toSingleQuotes('I love "unicorns" \'and\' "ponies"');
//=> I love 'unicorns' 'and' 'ponies' 

You can also use it as a CLI app by installing it globally:

$ npm install --global to-single-quotes
$ to-single-quotes --help
 
Usage
  to-single-quotes <path|glob>
  cat input.txt | to-single-quotes > output.txt
 
Example
  to-single-quotes src/*.txt

MIT © Sindre Sorhus