to-double-quotes

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

to-double-quotes

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

$ npm install --save to-double-quotes
var toDoubleQuotes = require('to-double-quotes');
 
toDoubleQuotes('I love \'unicorns\' "and" \'ponies\'');
//=> I love "unicorns" "and" "ponies" 
$ npm install --global to-double-quotes
$ to-double-quotes --help
 
  Usage
    $ to-double-quotes <string>
    $ echo <string> | to-double-quotes
 
  Example
    $ to-double-quotes "I love 'unicorns'"
    I love "unicorns"

See to-single-quotes for the inverse.

MIT © Sindre Sorhus