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 - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

package.json
{
"name": "to-single-quotes",
"version": "0.3.0",
"version": "0.3.1",
"description": "Convert matching double-quotes to single-quotes: I \"love\" unicorns => I 'love' unicorns",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -12,43 +12,17 @@ # to-single-quotes [![Build Status](https://travis-ci.org/sindresorhus/to-single-quotes.svg?branch=master)](https://travis-ci.org/sindresorhus/to-single-quotes)

#### [npm](https://npmjs.org/package/to-single-quotes)
```bash
$ npm install --save to-single-quotes
```
npm install --save to-single-quotes
```
Or globally if you want to use it as a CLI app:
```bash
$ bower install --save to-single-quotes
```
npm install --global to-single-quotes
```
You can then use it in your terminal like:
```bash
$ component install sindresorhus/to-single-quotes
```
to-single-quotes src/*.txt
```
*(make sure to have a backup before running this!)*
Or pipe something to it:
## Usage
```
cat input.txt | to-single-quotes > output.txt
```
#### [Bower](http://bower.io)
```
bower install --save to-single-quotes
```
#### [Component](https://github.com/component/component)
```
component install sindresorhus/to-single-quotes
```
## Example
##### Node.js

@@ -74,4 +48,26 @@

## CLI
You can also use it as a CLI app by installing it globally:
```bash
$ npm install --global to-single-quotes
```
### Usage
```bash
$ 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](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)

@@ -11,3 +11,3 @@ /*!

var toSingleQuotes = function (str) {
return str.replace(/(?:\\*)?"([^"\\]*\\")*[^"]*"/g, function (match) {
return str.replace(/(?:\\*)?"([^"\\]*\\.)*[^"]*"/g, function (match) {
return match

@@ -14,0 +14,0 @@ .replace(/\\"/g, '"') // unescape double-quotes

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