Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

to-single-quotes

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-single-quotes

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

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
decreased by-68.51%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 11 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc