# quote

> Add quotes to given string unless it already has them

Latest version **0.4.0** (published 2015-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install quote
pnpm add quote
yarn add quote
bun add quote
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2015-02-09 |
| First published | 2014-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Gleb Bahmutov |
| Maintainers | bahmutov |
| Keywords | string, quote, quotes, single, double |

## Links

- npm: https://www.npmjs.com/package/quote
- Repository: git@github.com:bahmutov/quote
- Homepage: https://github.com/bahmutov/quote
- Issues: https://github.com/bahmutov/quote/issues
- npm.io page: https://npm.io/package/quote

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.4.0 (latest) — 2015-02-09
- 0.3.0 — 2015-01-21
- 0.2.2 — 2014-12-06
- 0.2.1 — 2014-09-28
- 0.2.0 — 2014-09-28
- 0.1.1 — 2014-09-28
- 0.1.0 — 2014-09-28

## README

# quote

> Safe quoting a given string without adding duplicate quotes

[![NPM info][nodei.co]](https://npmjs.org/package/quote)

[![Build status][ci-image]][ci-url]
[![dependencies][dependencies-image]][dependencies-url]
[![devdependencies][quote-devdependencies-image] ][quote-devdependencies-url]

Install using node or bower

    npm install quote --save
    bower install quote --save

Use

    // node
    var quote = require('quote');
    quote('foo'); // "foo"
    quote('"foo"'); // "foo"
    quote(quote('foo')); // "foo"

In the browser just use global function `quote`

## Changing quote character

Only single quote character is supported, default is double quotes `"`.
To change:

    var quote = require('quote')({ quotes: '*' });
    quote('foo'); // *foo*
    quote('bar'); // *bar*

## To build and test

Because this is both Node and browser package, you need to build it using 
[universal module definition CLI tool](https://github.com/ForbesLindesay/umd).

    npm run build
    npm test

## Small print

Author: Gleb Bahmutov &copy; 2014
[@bahmutov](https://twitter.com/bahmutov) [glebbahmutov.com](http://glebbahmutov.com)

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github

[ci-image]: https://travis-ci.org/bahmutov/quote.png?branch=master
[ci-url]: https://travis-ci.org/bahmutov/quote
[nodei.co]: https://nodei.co/npm/quote.png?downloads=true
[dependencies-image]: https://david-dm.org/bahmutov/quote.png
[dependencies-url]: https://david-dm.org/bahmutov/quote
[quote-devdependencies-image]: https://david-dm.org/bahmutov/quote/dev-status.png
[quote-devdependencies-url]: https://david-dm.org/bahmutov/quote#info=devDependencies

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