# to-single-quotes

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

Latest version **4.0.0** (published 2021-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install to-single-quotes
pnpm add to-single-quotes
yarn add to-single-quotes
bun add to-single-quotes
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-04-18 |
| First published | 2014-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 57 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | normalize, quotes, quote, single, singlequotes, single-quotes, text, convert, string, code, matching, replace |

## Links

- npm: https://www.npmjs.com/package/to-single-quotes
- Repository: https://github.com/sindresorhus/to-single-quotes
- Homepage: https://github.com/sindresorhus/to-single-quotes#readme
- Issues: https://github.com/sindresorhus/to-single-quotes/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/to-single-quotes

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-04-18
- 3.0.0 — 2017-03-15
- 2.0.1 — 2016-07-04
- 2.0.0 — 2015-10-08
- 1.0.4 — 2015-10-03
- 1.0.3 — 2015-05-31
- 1.0.2 — 2015-03-16
- 1.0.1 — 2014-08-22
- 1.0.0 — 2014-08-22
- 0.3.2 — 2014-04-29
- 0.3.1 — 2014-04-11
- 0.3.0 — 2014-03-28
- 0.2.0 — 2014-01-26
- 0.1.0 — 2014-01-18

## README

# to-single-quotes

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

## Install

```
$ npm install to-single-quotes
```

## Usage

```js
import toSingleQuotes from 'to-single-quotes';

toSingleQuotes('I love "unicorns" \'and\' "ponies"');
//=> "I love 'unicorns' 'and' 'ponies'"
```

## Related

- [to-single-quotes-cli](https://github.com/sindresorhus/to-single-quotes-cli) - CLI for this module
- [to-double-quotes](https://github.com/sindresorhus/to-double-quotes) - Convert matching single-quotes to double-quotes

---
_Source: https://npm.io/package/to-single-quotes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
