JSPM

to-single-quotes-shahata

0.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 85
  • Score
    100M100P100Q81153F
  • License MIT

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

Package Exports

  • to-single-quotes-shahata

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (to-single-quotes-shahata) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

to-single-quotes Build Status

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

See to-double-quotes for the inverse.

Install

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

Usage

Node.js
var toSingleQuotes = require('to-single-quotes');
Bower
<script src="bower_components/to-single-quotes/to-single-quotes.js"></script>
Usage
toSingleQuotes('I love "unicorns" \'and\' "ponies"');
//=> I love 'unicorns' 'and' 'ponies'

CLI

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

$ npm install --global to-single-quotes

Usage

$ to-single-quotes --help

Usage
  to-single-quotes <path|glob>
  cat input.txt | to-single-quotes > output.txt

Example
  to-single-quotes src/*.txt

License

MIT © Sindre Sorhus