Skip to content

Instantly share code, notes, and snippets.

@A
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A/cec41b405940b9fea413 to your computer and use it in GitHub Desktop.
Save A/cec41b405940b9fea413 to your computer and use it in GitHub Desktop.
'use strict';
// Dependencies
var textr = require('textr');
var typograph = require('./typograph');
/**
* append options on runtime
*/
typograph("C'est la 'nature'?", { locale: 'ru' }); // C'est la «nature»?
/**
* Or set another one defaults
*/
var tf = textr({ locale: 'ru' })
.use(typograph)
.use(/* … */)
tf("C'est la 'nature'?"); // C'est la «nature»?
'use strict';
// Dependencies
var textr = require('textr');
// create textr with default options
module.exports = textr({ locale: 'en-us' })
.use(require('typographic-ellipses'))
.use(require('typographic-quotes'))
.use(require('typographic-math'))
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment