{"_id":"text-ellipsis","_rev":"881265","name":"text-ellipsis","description":"Cut a string if too long","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"chtefi","email":"derste@gmail.com"}],"time":{"modified":"2024-07-18T10:08:05.000Z","created":"2015-09-14T23:31:11.801Z","1.0.3":"2015-09-15T17:10:07.513Z","1.0.2":"2015-09-14T23:47:53.789Z","1.0.1":"2015-09-14T23:31:11.801Z"},"users":{"xchris":true},"author":{"name":"Stéphane DEROSIAUX"},"repository":{"type":"git","url":"git+https://github.com/chtefi/text-ellipsis.git"},"versions":{"1.0.3":{"name":"text-ellipsis","version":"1.0.3","description":"Cut a string if too long","main":"lib/index.js","scripts":{"clean":"rimraf lib dist","build":"babel index.js --out-dir lib","build:umd":"webpack index.js dist/text-ellipsis.js && set NODE_ENV=production&& webpack index.js dist/text-ellipsis.min.js","lint":"eslint index.js","test":"_mocha --compilers js:babel/register","prepublish":"npm run lint && npm run test && npm run clean && npm run build && npm run build:umd"},"keywords":["text","ellipsis","string","overflow"],"repository":{"type":"git","url":"git+https://github.com/chtefi/text-ellipsis.git"},"author":{"name":"Stéphane DEROSIAUX"},"license":"MIT","bugs":{"url":"https://github.com/chtefi/text-ellipsis/issues"},"homepage":"https://github.com/chtefi/text-ellipsis#readme","devDependencies":{"babel":"^5.8.23","babel-core":"^5.8.24","babel-loader":"^5.3.2","chai":"^3.2.0","eslint":"^1.4.1","eslint-config-airbnb":"0.0.8","mocha":"^2.3.2","rimraf":"^2.4.3","webpack":"^1.12.1"},"gitHead":"cc2bb93d76d4bce73800c54d74ebbdc2d175ba2c","_id":"text-ellipsis@1.0.3","_shasum":"b7991ca1518eaef2603252e26dc6330a61b44348","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"chtefi","email":"derste@gmail.com"},"maintainers":[{"name":"chtefi","email":"derste@gmail.com"}],"dist":{"shasum":"b7991ca1518eaef2603252e26dc6330a61b44348","tarball":"http://registry-npm.ywwl.com/text-ellipsis/download/text-ellipsis-1.0.3.tgz","integrity":"sha512-k+qJ/Q+pMThYjniWXa6mY8IU75XZXGUXumvbmKPsO6IQckPs5wlI6TvXae5yj+MBqmPJIseGfjO/aeLWE2B1aA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCW+RsoJ39BoaT6Qj2TLYTez8FnY+rXBFElT0GHfPiaAIgMeyWelfrGsTOYm/4vH8TDusx7Hi6X0dzE/sIWCAHmQY="}],"size":5405,"noattachment":false,"key":"/text-ellipsis/-/text-ellipsis-1.0.3.tgz"},"directories":{},"publish_time":1442337007513,"_cnpm_publish_time":1442337007513},"1.0.2":{"name":"text-ellipsis","version":"1.0.2","description":"Cut a string if too long","main":"lib/index.js","scripts":{"clean":"rimraf lib dist","build":"babel index.js --out-dir lib","build:umd":"webpack index.js dist/text-ellipsis.js && set NODE_ENV=production&& webpack index.js dist/text-ellipsis.min.js","lint":"eslint index.js","test":"echo \"Error: no test specified\" && exit 0","prepublish":"npm run lint && npm run test && npm run clean && npm run build && npm run build:umd"},"repository":{"type":"git","url":"git+https://github.com/chtefi/text-ellipsis.git"},"author":{"name":"Stéphane DEROSIAUX"},"license":"MIT","bugs":{"url":"https://github.com/chtefi/text-ellipsis/issues"},"homepage":"https://github.com/chtefi/text-ellipsis#readme","devDependencies":{"babel":"^5.8.23","babel-core":"^5.8.24","babel-loader":"^5.3.2","eslint":"^1.4.1","eslint-config-airbnb":"0.0.8","rimraf":"^2.4.3","webpack":"^1.12.1"},"gitHead":"cd98dfe7689823a47a3130986bb7b18fd20170d9","_id":"text-ellipsis@1.0.2","_shasum":"fd188a222a10479f360ebacb80a59bc7ef1969bd","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"chtefi","email":"derste@gmail.com"},"maintainers":[{"name":"chtefi","email":"derste@gmail.com"}],"dist":{"shasum":"fd188a222a10479f360ebacb80a59bc7ef1969bd","tarball":"http://registry-npm.ywwl.com/text-ellipsis/download/text-ellipsis-1.0.2.tgz","integrity":"sha512-XkHFOvum+1nR0FNr1TAOJgwQxRMEqVRWzBd+IjQYy+fAKJ40llROOxGhPrwlZ4DEaPaam5VjrK/LkXnp8PGrVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNduUGZkpJh5fIR+I2b5+ExdeHIXDhdPxf7ZLblEMtBgIgHGcLs06W9z33i4jmt9h94DMwcgBDXeSAxYVYKZlai7o="}],"size":5291,"noattachment":false,"key":"/text-ellipsis/-/text-ellipsis-1.0.2.tgz"},"directories":{},"publish_time":1442274473789,"_cnpm_publish_time":1442274473789},"1.0.1":{"name":"text-ellipsis","version":"1.0.1","description":"Cut a string if too long","main":"index.js","scripts":{"clean":"rimraf lib dist","build":"babel index.js --out-dir lib","build:umd":"webpack index.js dist/text-ellipsis.js && set NODE_ENV=production&& webpack index.js dist/text-ellipsis.min.js","lint":"eslint index.js","test":"echo \"Error: no test specified\" && exit 0","prepublish":"npm run lint && npm run test && npm run clean && npm run build && npm run build:umd"},"repository":{"type":"git","url":"git+https://github.com/chtefi/text-ellipsis.git"},"author":{"name":"Stéphane DEROSIAUX"},"license":"MIT","bugs":{"url":"https://github.com/chtefi/text-ellipsis/issues"},"homepage":"https://github.com/chtefi/text-ellipsis#readme","devDependencies":{"babel":"^5.8.23","babel-core":"^5.8.24","babel-loader":"^5.3.2","eslint":"^1.4.1","eslint-config-airbnb":"0.0.8","rimraf":"^2.4.3","webpack":"^1.12.1"},"gitHead":"6aeef78a63592e64d59b7187c997ce4f5c08286c","_id":"text-ellipsis@1.0.1","_shasum":"ae0cb5a83cfec276397944631f46210d8bc06e01","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"chtefi","email":"derste@gmail.com"},"maintainers":[{"name":"chtefi","email":"derste@gmail.com"}],"dist":{"shasum":"ae0cb5a83cfec276397944631f46210d8bc06e01","tarball":"http://registry-npm.ywwl.com/text-ellipsis/download/text-ellipsis-1.0.1.tgz","integrity":"sha512-gkvBJBz9taqHphs7kVN9KOinlCtCE1Cpmmg53/zqNNiaI/A4SGC8rGjabh3Fe6YCIf7UFG7XJSx+7OVhHLuxRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWP144xSAziJhiEOAjv73ihhQSG73A26qufBLLhYaX6AIgdR/14xv+Sz83NMOhHADOLi4Br1GDTjfpiC7uQUZHxGM="}],"size":5155,"noattachment":false,"key":"/text-ellipsis/-/text-ellipsis-1.0.1.tgz"},"directories":{},"publish_time":1442273471801,"_cnpm_publish_time":1442273471801}},"readme":"# text-ellipsis [![Build Status](https://travis-ci.org/chtefi/text-ellipsis.svg)](https://travis-ci.org/chtefi/text-ellipsis)\r\n> Cut off a string if too long\r\n\r\n## Why\r\n\r\nYou always want to cut long strings.\r\n\r\n## Install\r\n\r\n```shell\r\n$ npm install --save text-ellipsis\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nvar ellipsis = require('text-ellipsis');\r\n\r\nvar short = ellipsis('a very long text', 10);\r\nconsole.log(short);\r\n// \"a very ...\"\r\n\r\nvar short = ellipsis('a very long text', 10, { side: 'start' });\r\nconsole.log(short);\r\n// \"...ng text\"\r\n\r\nvar short = ellipsis('a very long text', 10, { ellipsis: ' END' });\r\nconsole.log(short);\r\n// \"a very END\"\r\n```\r\n\r\n","_attachments":{},"homepage":"https://github.com/chtefi/text-ellipsis#readme","bugs":{"url":"https://github.com/chtefi/text-ellipsis/issues"},"license":"MIT"}