{"_id":"textr","_rev":"13-9235f2651beeaa9e50fa9c398ea2527c","name":"textr","description":"Tiny and extendable text transforming framework","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.1":{"name":"textr","version":"0.1.1","description":"Tiny and extendable text transforming framework","main":"index.js","scripts":{"coverage":"istanbul cover _mocha","precoveralls":"npm run coverage","coveralls":"coveralls < coverage/lcov.info","test":"mocha --require should","tdd":"npm test -- --watch","postpublish":"git push --follow-tags"},"keywords":["typographic","textr","transformer","text"],"author":{"name":"Anton Shuvalov","email":"anton@shuvalov.info"},"license":"MIT","devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.11","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^5.2.0","typographic-ellipses":"^1.0.9","typographic-quotes":"^1.1.0","typographic-single-spaces":"^1.0.0"},"gitHead":"c717328a0c2a51bef4a4b267a2ee3d5a6e58b84f","_id":"textr@0.1.1","_shasum":"2af922765d21fcb34c964ad2c6b7f1e0004f54ac","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"shuvalov-anton","email":"anton_shuvalov@me.com"},"maintainers":[{"name":"shuvalov-anton","email":"anton_shuvalov@me.com"}],"dist":{"shasum":"2af922765d21fcb34c964ad2c6b7f1e0004f54ac","tarball":"https://registry.npmjs.org/textr/-/textr-0.1.1.tgz","integrity":"sha512-uJVfblTFnvtxb/sylIV8GSkHyKLB1aLZdgoN+gHgwViWRYL0MAqXEPT7Ld6nbYjzl/kDYv+X6i7fl01GL1K5Ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAQ5uY4tgudMIHG2G2VgxLpeRmBLiUFANRprQAxnvkBAiA43r6LND3xrgCh+5q5Wp37YMqH54tYPXSNdvehRyFJ4g=="}]}},"0.2.0":{"name":"textr","version":"0.2.0","description":"Tiny and extendable text transforming framework","main":"index.js","scripts":{"coverage":"istanbul cover _mocha","precoveralls":"npm run coverage","coveralls":"coveralls < coverage/lcov.info","test":"mocha","tdd":"npm test -- --watch"},"keywords":["typographic","textr","transformer","text"],"author":{"name":"Anton Shuvalov","email":"anton@shuvalov.info"},"license":"MIT","devDependencies":{"commander":"^2.7.1","coveralls":"^2.11.2","istanbul":"^0.3.11","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^5.2.0","typographic-ellipses":"^1.0.9","typographic-quotes":"^1.1.0","typographic-single-spaces":"^1.0.0"},"gitHead":"5cbb9947e061b47522f02e2973acfc9c2626ccbe","_id":"textr@0.2.0","_shasum":"4890cfbe8f7598fbd5f13e3719c67cd25580ad8d","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"shuvalov-anton","email":"anton_shuvalov@me.com"},"maintainers":[{"name":"shuvalov-anton","email":"anton@shuvalov.info"}],"dist":{"shasum":"4890cfbe8f7598fbd5f13e3719c67cd25580ad8d","tarball":"https://registry.npmjs.org/textr/-/textr-0.2.0.tgz","integrity":"sha512-SU0OHhAP3R/YikOCUurZHms378joCLDpQYrFFVaxKhJ59oU5z1mH/CxG53G/AZYmA3LJ5VfMs2lud4UGnekthg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzmaZxo4YmF4GjPfTWt7Od3QuPtKHQApo3bRXCMj10SgIgO69HY3Wf8d8MQ2/VV8QQQu/p2zBu3d/SKTuFhluyrfI="}]}},"0.2.1":{"name":"textr","version":"0.2.1","description":"Tiny and extendable text transforming framework","homepage":"http://shuvalov-anton.github.io/textr/","main":"index.js","repository":{"type":"git","url":"https://github.com/shuvalov-anton/textr"},"bugs":{"url":"https://github.com/shuvalov-anton/textr/issues"},"scripts":{"coverage":"istanbul cover _mocha","precoveralls":"npm run coverage","coveralls":"coveralls < coverage/lcov.info","test":"mocha","tdd":"npm test -- --watch"},"keywords":["typographic","textr","transformer","text"],"author":{"name":"Anton Shuvalov","email":"anton@shuvalov.info"},"maintainers":[{"name":"shuvalov-anton","email":"anton@shuvalov.info"},{"name":"matmuchrapna","email":"matmuchrapna@gmail.com"}],"license":"MIT","devDependencies":{"commander":"^2.7.1","coveralls":"^2.11.2","istanbul":"^0.3.11","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^5.2.0","typographic-ellipses":"^1.0.9","typographic-quotes":"^1.1.0","typographic-single-spaces":"^1.0.0"},"gitHead":"3e68629c5ead48905dfb57ac506d736bc2975c04","_id":"textr@0.2.1","_shasum":"6423d3fed1429ee722bc8a8edf5edefdfa6dcec4","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.2","_npmUser":{"name":"matmuchrapna","email":"matmuchrapna@gmail.com"},"dist":{"shasum":"6423d3fed1429ee722bc8a8edf5edefdfa6dcec4","tarball":"https://registry.npmjs.org/textr/-/textr-0.2.1.tgz","integrity":"sha512-edtJu6DuiqXMgC8p/Kb6rcgb+szTn1uZZPhwha23vyX+fFoTiN58RkQms6Yw8D7A/aRvhUkALFgU19vIpFBMtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmZ44R4q4PLnYXxhDzVCc2Crf/K2n2Wqs7Xv9T3srBrAiEAsr6peKtb6rdhUV68ZQoCBrOT9C5GZahSOLzYPC/RT+o="}]}},"0.2.2":{"name":"textr","version":"0.2.2","description":"Tiny and extendable text transforming framework","homepage":"http://shuvalov-anton.github.io/textr/","main":"index.js","repository":{"type":"git","url":"https://github.com/shuvalov-anton/textr"},"bugs":{"url":"https://github.com/shuvalov-anton/textr/issues"},"scripts":{"coverage":"istanbul cover _mocha","precoveralls":"npm run coverage","coveralls":"coveralls < coverage/lcov.info","test":"mocha","tdd":"npm test -- --watch"},"keywords":["typographic","textr","transformer","text"],"author":{"name":"Anton Shuvalov","email":"anton@shuvalov.info"},"maintainers":[{"name":"shuvalov-anton","email":"anton@shuvalov.info"},{"name":"matmuchrapna","email":"matmuchrapna@gmail.com"}],"license":"MIT","devDependencies":{"commander":"^2.7.1","coveralls":"^2.11.2","istanbul":"^0.3.11","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^5.2.0","typographic-ellipses":"^1.0.9","typographic-quotes":"^1.1.0","typographic-single-spaces":"^1.0.0"},"gitHead":"a64015a8a7e03737ccb2d7e730fc67a9984763ca","_id":"textr@0.2.2","_shasum":"c9ad506be61f81dbd17297a0fae4cb17747a45eb","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"shuvalov-anton","email":"anton_shuvalov@me.com"},"dist":{"shasum":"c9ad506be61f81dbd17297a0fae4cb17747a45eb","tarball":"https://registry.npmjs.org/textr/-/textr-0.2.2.tgz","integrity":"sha512-+3rQey+Jlv4eoCYJ+GmE69vtswOy2FfT8VJehsQlUHYOWkMNc6bffKUA3yXNIsbz5R54YWiFIiC+X56J5nugUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICowdk728WVPYQf/wasWwh1PcdpW+VU6XrVg3vFQ6l/XAiB3g7mfv3c9ZNDsKNWF991XK42luehJdWSGlPPPDV744Q=="}]}},"0.3.0":{"name":"textr","version":"0.3.0","description":"Tiny and extendable text transforming framework","homepage":"http://shuvalov-anton.github.io/textr/","main":"index.js","repository":{"type":"git","url":"https://github.com/shuvalov-anton/textr"},"bugs":{"url":"https://github.com/shuvalov-anton/textr/issues"},"scripts":{"coverage":"istanbul cover _mocha","precoveralls":"npm run coverage","coveralls":"coveralls < coverage/lcov.info","test":"mocha","tdd":"npm test -- --watch"},"keywords":["typographic","textr","transformer","text"],"author":{"name":"Anton Shuvalov","email":"anton@shuvalov.info"},"maintainers":[{"name":"shuvalov-anton","email":"anton@shuvalov.info"},{"name":"matmuchrapna","email":"matmuchrapna@gmail.com"}],"license":"MIT","devDependencies":{"commander":"^2.7.1","coveralls":"^2.11.2","istanbul":"^0.3.11","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^5.2.0"},"gitHead":"b2c8486c4aaaa20a75f70713ab6794432cbfee27","_id":"textr@0.3.0","_shasum":"717361286962ac8df36b7a2619fb773a15b9b7f7","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"shuvalov-anton","email":"anton_shuvalov@me.com"},"dist":{"shasum":"717361286962ac8df36b7a2619fb773a15b9b7f7","tarball":"https://registry.npmjs.org/textr/-/textr-0.3.0.tgz","integrity":"sha512-yQrF3w9ThyNvyJjkpFTwBpsVxRQ4870xHg2fue1xeK1J1EZIx5cV7XPW6Fwi/XNC0du/3t9CNWZvlHUfCxPpPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJmXkGdqePYefo4cY/QwIg3XUzAXN5WWsDSCo9sG/fZAiEAkHQvg1kNVhB3WWlg29Mnzj7K4bN59JutbEiBaDY/r+E="}]}}},"readme":"# textr\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Coveralls Status][coveralls-image]][coveralls-url]\n[![Dependency Status][depstat-image]][depstat-url]\n[![DevDependency Status][depstat-dev-image]][depstat-dev-url]\n\n> Textr is simple framework to compose text transformation functions\n\nTextr is good instrument to create modular tools to [make your typography better][bad-habits].\nIt can compose any functions that get text, transform it and return result of\nprocessing. For example, check out few: [typographic-quotes][typographic-quotes],\n[typographic-math-symbols][typographic-math-symbols],\n[typographic-em-dashes][typographic-em-dashes] and [typographic-ellipses][typographic-ellipses].\n\nPlugins are available on npm, labelled with [textr][textr-npm]\nkeyword. Also you can easily create new one. Don’t be scared.\n\n## Idea behind textr\n\nTypography for everybody! At the same time it’s impossible to create one ideal\ntypographic engine. It doesn’t work this way. What we can do with it? We can\neasily create and maintain small, simple, full-tested and single responsible\nmodules. After this we can compose bunch of these well done modules for every\nspecific situation we need, and everybody will be happy with it’s\nown ideal text transformer.\n\n## Install\n\n```\nnpm install --save textr\n```\n\n\n## Usage\n\n```js\nvar textr    = require('textr');\nvar ellipses = require('typographic-ellipses');\nvar spaces   = require('typographic-single-spaces');\nvar quotes  = require('typographic-quotes');\n\n// Create new text transformer by compose yours\ntf = textr({ locale: 'ru'})\n  .use(ellipses)\n  .use(spaces)\n  .use(quotes)\n  .use(String.prototype.trim)\n;\n\n// then just send some text to the transformer\ntf('Hello  \"world\"...\\n'); // Hello «world»…\n```\n\n## API\n\n### textr(defaults)\n\nCreate new textr transform function (`tf`). You can pass default options when\ncreate new transform stack.\n\n\n### tf.use(...fn)\n\nRegister transform function as `tf` middleware.\n\n### tf.exec(text, options)\n\nProcess given text by the middlewares.\n\n### tf(text)\n\nIdentical to `tf.exec(text)`. This alias makes `tf` just regular transform\nfunction, that you can register as middleware for `textr` as well.\n\n```js\nvar typorgapher = textr().use(typography, tools, here)\nvar autocorrector = textr().use(autocorrection, things)\nvar smiles = textr().use(text, to, smiles, goodies)\n\nvar tf = textr()\n  .use(typographer)\n  .use(autocorrector)\n  .use(smiles)\n;\n\ntf(text); // oh, that's awesome!11\n\n```\n\n\n## Plugins API\n\nEach plugin will be called with 2 arguments: `text` and `options`\nsetted on `textr()`.\n\n```\nfunction plugin(text, options) {\n  console.log(options); // { locale: 'ru' }\n  return text;\n}\n```\n\nTo support `String.prototype` methods as transformation functions, `this` value\nis equal to the `text`.\n\n\n## License\n\n[textr-npm]: https://www.npmjs.com/browse/keyword/textr\n\nMIT © [Shuvalov Anton](http://shuvalov.info), [Vladimir Starkov](http://github.com/matmuchrapna)\n\n[bad-habits]: http://practicaltypography.com/typewriter-habits.html\n\n[npm-url]: https://npmjs.org/package/textr\n[npm-image]: http://img.shields.io/npm/v/textr.svg\n\n[travis-url]: https://travis-ci.org/shuvalov-anton/textr\n[travis-image]: http://img.shields.io/travis/shuvalov-anton/textr.svg\n\n[coveralls-url]: https://coveralls.io/r/shuvalov-anton/textr\n[coveralls-image]: http://img.shields.io/coveralls/shuvalov-anton/textr.svg\n\n[depstat-url]: https://david-dm.org/shuvalov-anton/textr\n[depstat-image]: https://david-dm.org/shuvalov-anton/textr.svg\n\n[depstat-dev-url]: https://david-dm.org/shuvalov-anton/textr\n[depstat-dev-image]: https://david-dm.org/shuvalov-anton/textr/dev-status.svg\n\n[typographic-quotes]: https://github.com/matmuchrapna/typographic-quotes\n[typographic-math-symbols]: https://github.com/matmuchrapna/typographic-math-symbols\n[typographic-em-dashes]: https://github.com/matmuchrapna/typographic-em-dashes\n[typographic-ellipses]: https://github.com/matmuchrapna/typographic-ellipses\n","maintainers":[{"name":"shuvalov-anton","email":"anton@shuvalov.info"},{"name":"iamstarkov","email":"iamstarkov@gmail.com"}],"time":{"modified":"2022-06-27T05:48:24.154Z","created":"2015-04-11T22:52:19.184Z","0.1.1":"2015-04-11T22:52:19.184Z","0.2.0":"2015-04-16T10:17:50.802Z","0.2.1":"2015-04-16T11:41:32.305Z","0.2.2":"2015-04-18T16:29:32.832Z","0.3.0":"2015-04-20T22:20:28.460Z"},"keywords":["typographic","textr","transformer","text"],"author":{"name":"Anton Shuvalov","email":"anton@shuvalov.info"},"license":"MIT","readmeFilename":"readme.md","homepage":"http://shuvalov-anton.github.io/textr/","repository":{"type":"git","url":"https://github.com/shuvalov-anton/textr"},"bugs":{"url":"https://github.com/shuvalov-anton/textr/issues"},"users":{"denysdovhan":true,"iamstarkov":true,"denji":true}}