# typographic-quotes

> Always use curly quotes

Latest version **2.0.1** (published 2015-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install typographic-quotes
pnpm add typographic-quotes
yarn add typographic-quotes
bun add typographic-quotes
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2015-12-15 |
| First published | 2015-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Vladimir Starkov |
| Maintainers | iamstarkov |
| Keywords | typographic, quotes, textr |

## Links

- npm: https://www.npmjs.com/package/typographic-quotes
- Repository: https://github.com/matmuchrapna/typographic-quotes
- Issues: https://github.com/matmuchrapna/typographic-quotes/issues
- npm.io page: https://npm.io/package/typographic-quotes

## Dependencies (1)

- [typographic-quotes-l10n-db](https://npm.io/package/typographic-quotes-l10n-db.md) ^1.0.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2015-12-15
- 2.0.0 — 2015-12-13
- 1.2.2 — 2015-12-13
- 1.2.1 — 2015-04-16
- 1.2.0 — 2015-04-12
- 1.1.0 — 2015-04-09
- 1.0.6 — 2015-04-05
- 1.0.5 — 2015-04-05
- 1.0.4 — 2015-04-05
- 1.0.3 — 2015-04-05
- 1.0.2 — 2015-04-04
- 1.0.1 — 2015-04-03
- 1.0.0 — 2015-04-03

## README

# typographic-quotes

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coveralls Status][coveralls-image]][coveralls-url]
[![Dependency Status][depstat-image]][depstat-url]

> [Always use curly quotes][rtfm]

Micro module to help eliminate one of the [bad typewriter habits][habits].


## Install

```sh
npm install --save typographic-quotes
```


## Usage

Use typographic quotes for your text with respect to your locale, basically for
proper primary and secondary quotes. Pass object with specified locale field as
second parameter. **`locale` field is mandatory.** This module relies on
[`typographic-quotes-l10n-db`][quotesDB] in choosing proper quotes
for every language.


> In American English, double quotes are used normally (the “primary” style).
> If quote marks are used inside another pair of quote marks, then single quotes
> are used as the “secondary” style. For example: “Didn't she say ‘I like red
> best’ when asked her favorite wine?” he wondered to himself.  
— [from the Wikipedia](http://en.wikipedia.org/wiki/Quotation_mark)

```js
var quotes = require('typographic-quotes');

// in american english (en-us) primary quotes are “”, and secondary are ‘’.
// in danish (da) primary quotes are »«, and secondary are ›‹.

// `locale` field is mandatory
quotes(`foo 'foo' bar`, { locale: 'en-us' }); // foo “foo” bar
quotes(`foo 'foo' bar`, { locale: 'da' });    // foo »foo« bar
quotes(`foo "foo 'inside' bar" bar`, { locale: 'en-us' }); // foo “foo ‘inside’ bar” bar
quotes(`foo 'foo "inside" bar' bar`, { locale: 'da' });    // foo »foo ›inside‹ bar« bar
```

[quotesDB]: https://www.npmjs.com/package/typographic-quotes-l10n-db


## Apostrophes

If you want to see proper apostrophes too, take a look at [apostrophes][typographic-apostrophes] and [apostrophes-for-possessive-plurals][typographic-apostrophes-for-possessive-plurals] typographic modules. Use first one before this module, second after: `apostrophes → quotes → apostrophes-for-possessive-plurals` (order is important). Check complex usage in [typography playground][playground].

[typographic-apostrophes]: https://www.npmjs.com/package/typographic-apostrophes
[typographic-apostrophes-for-possessive-plurals]: https://www.npmjs.com/package/typographic-apostrophes-for-possessive-plurals
[playground]: https://github.com/matmuchrapna/typographic-playground

## License

MIT © [Vladimir Starkov](https://iamstarkov.com/)

[rtfm]: http://practicaltypography.com/straight-and-curly-quotes.html
[habits]: http://practicaltypography.com/typewriter-habits.html

[npm-url]: https://npmjs.org/package/typographic-quotes
[npm-image]: http://img.shields.io/npm/v/typographic-quotes.svg

[travis-url]: https://travis-ci.org/iamstarkov/typographic-quotes
[travis-image]: http://img.shields.io/travis/iamstarkov/typographic-quotes.svg

[coveralls-url]: https://coveralls.io/r/iamstarkov/typographic-quotes
[coveralls-image]: http://img.shields.io/coveralls/iamstarkov/typographic-quotes.svg

[depstat-url]: https://david-dm.org/iamstarkov/typographic-quotes
[depstat-image]: https://david-dm.org/iamstarkov/typographic-quotes.svg

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