1.0.17 • Published 1 year ago
typographic-em-dash v1.0.17
typographic-em-dash

Micro module to fix a common typographic issue that is hard to fix with most keyboard layouts.
This is mainly meant for French typography, it replaces -- by an em dash (en, fr). If the locale is French and we have a pair like — foo —, the first space after the first em dash and the space preceding the second dash will be a narrow no-break space (en, fr).
Submit a PR to src/db.js
to add support for your locale.
Install
npm:
npm install --save typographic-em-dash
Usage
var dash = require('typographic-em-dash')
dash(`--foo--`, { locale: 'fr' })
// will be replaced by —foo—
dash(`-- foo --`, { locale: 'fr' })
// will be replaced by —NNBSfooNNBs— where NNBS is a narrow no-break space
dash(`--foo--`, { locale: 'en' })
// will be replaced by —foo—
dash(`-- foo --`, { locale: 'en' })
// will be replaced by — foo —
This module can also be used through textr.
License
1.0.17
1 year ago
1.0.16
4 years ago
1.0.15
5 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago