{"_id":"truncate-utf8-bytes","_rev":"9-5d4b74f56e6251a544a376aeff8d84b3","name":"truncate-utf8-bytes","description":"Truncate string to given length in bytes","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"truncate-utf8-bytes","version":"1.0.0","description":"Truncate string to length in bytes","main":"index.js","browser":"browser.js","scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/parshap/truncate-utf8-bytes.git"},"keywords":["truncate","utf8"],"author":{"name":"Carl Xiong","email":"xiongc05@gmail.com"},"license":"WTFPL","bugs":{"url":"https://github.com/parshap/truncate-utf8-bytes/issues"},"homepage":"https://github.com/parshap/truncate-utf8-bytes#readme","devDependencies":{"tape":"^4.2.2"},"dependencies":{"utf8-byte-length":"^1.0.1"},"contributors":[{"name":"Carl Xiong","email":"xiongc05@gmail.com"},{"name":"Parsha Pourkhomami","email":"parshap@gmail.com"}],"gitHead":"6cf4f21baf8e062db3cbb5b4d5f8a649e8a5c8ef","_id":"truncate-utf8-bytes@1.0.0","_shasum":"bba69230e63bc34fe53158c262d7950fa420590d","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"parshap","email":"parshap+npm@gmail.com"},"maintainers":[{"name":"parshap","email":"parshap+npm@gmail.com"}],"dist":{"shasum":"bba69230e63bc34fe53158c262d7950fa420590d","tarball":"https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.0.tgz","integrity":"sha512-c2+evkesk63K2oOBjmzv7h1Vk/cewG2RnYd/RRYLAAz5dUN1i5qn5UCprqiOjaIfbPoXCp+h4as2AEg5vuCDSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQuyXSjqdNR39Mj91qCfsfICrf5i0tY0KYHgCGFKAPKgIgEE3b63vLyUspj/EqSI42iWUVwAuLGBdideG3aFo2i6k="}]}},"1.0.1":{"name":"truncate-utf8-bytes","version":"1.0.1","description":"Truncate string to given length in bytes","main":"index.js","browser":"browser.js","scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/parshap/truncate-utf8-bytes.git"},"keywords":["truncate","utf8"],"author":{"name":"Carl Xiong","email":"xiongc05@gmail.com"},"license":"WTFPL","bugs":{"url":"https://github.com/parshap/truncate-utf8-bytes/issues"},"homepage":"https://github.com/parshap/truncate-utf8-bytes#readme","devDependencies":{"tape":"^4.2.2"},"dependencies":{"utf8-byte-length":"^1.0.1"},"contributors":[{"name":"Carl Xiong","email":"xiongc05@gmail.com"},{"name":"Parsha Pourkhomami","email":"parshap@gmail.com"}],"gitHead":"3528735219b2c17f5b01a444b23383752542f769","_id":"truncate-utf8-bytes@1.0.1","_shasum":"bafcbf814c5e44ec09168934eb236edf756dea2d","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"parshap","email":"parshap+npm@gmail.com"},"maintainers":[{"name":"carltonf","email":"xiongc05@gmail.com"},{"name":"parshap","email":"parshap+npm@gmail.com"}],"dist":{"shasum":"bafcbf814c5e44ec09168934eb236edf756dea2d","tarball":"https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.1.tgz","integrity":"sha512-2RHHTPLzaZ3ZSnoJIk/n/DAVUFXfPC3W3ZBnz8a4keCeN95YVeud4yWZrrweprrp3Ud8hwb6X/JsfL5V9q+cMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhIglBZVdKKMTkkwbAOD6sDkpQ8AZKhHIQtgMTM3ehSAiAl43JP7Dw3AmuWEv3E5cnRNNxOCPWs5zTXTCFGMEgFkw=="}]}},"1.0.2":{"name":"truncate-utf8-bytes","version":"1.0.2","description":"Truncate string to given length in bytes","main":"index.js","browser":"browser.js","scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/parshap/truncate-utf8-bytes.git"},"keywords":["truncate","utf8"],"author":{"name":"Carl Xiong","email":"xiongc05@gmail.com"},"license":"WTFPL","bugs":{"url":"https://github.com/parshap/truncate-utf8-bytes/issues"},"homepage":"https://github.com/parshap/truncate-utf8-bytes#readme","devDependencies":{"tape":"^4.2.2"},"dependencies":{"utf8-byte-length":"^1.0.1"},"contributors":[{"name":"Carl Xiong","email":"xiongc05@gmail.com"},{"name":"Parsha Pourkhomami","email":"parshap@gmail.com"}],"gitHead":"c8fcebc8be093c8bd8db1e7d75c09b9fce7e4708","_id":"truncate-utf8-bytes@1.0.2","_shasum":"405923909592d56f78a5818434b0b78489ca5f2b","_from":".","_npmVersion":"3.10.7","_nodeVersion":"6.6.0","_npmUser":{"name":"parshap","email":"parshap+npm@gmail.com"},"dist":{"shasum":"405923909592d56f78a5818434b0b78489ca5f2b","tarball":"https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz","integrity":"sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIComjtiXCeLTZPoOwbYG5hmrlLd++3qttGnSNJpMX5g4AiAPF69Sm/kMnNER/GKtO5tC1+lty3s7IBKplXl2fREC7g=="}]},"maintainers":[{"name":"carltonf","email":"xiongc05@gmail.com"},{"name":"parshap","email":"parshap+npm@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/truncate-utf8-bytes-1.0.2.tgz_1475174637574_0.12184767331928015"}}},"readme":"# truncate-utf8-bytes [![build status](https://secure.travis-ci.org/parshap/truncate-utf8-bytes.svg?branch=master)](http://travis-ci.org/parshap/truncate-utf8-bytes)\n\nTruncate a string to the given length in bytes. Correctly handles\nmulti-byte characters and surrogate pairs.\n\nA browser implementation that doesn't use `Buffer.byteLength` is\nprovided to minimize build size.\n\n## Example\n\n```js\nvar truncate = require(\"truncate-utf8-bytes\")\nvar str = \"a☃\" // a = 1 byte, ☃ = 3 bytes\nconsole.log(truncate(str, 2))\n// -> \"a\"\n```\n\n## API\n\n### `var truncate = require(\"truncate-utf8-bytes\")`\n\n*When using browserify or webpack*, this automatically resolves to an\nimplementation that does not use `Buffer.byteLength`.\n\n### `truncate(string, length)`\n\nReturns `string` truncated to at most `length` bytes in length.\n","maintainers":[{"name":"carltonf","email":"xiongc05@gmail.com"},{"name":"parshap","email":"parshap+npm@gmail.com"}],"time":{"modified":"2022-06-27T21:51:12.552Z","created":"2015-11-06T11:18:47.644Z","1.0.0":"2015-11-06T11:18:47.644Z","1.0.1":"2015-11-06T12:51:41.020Z","1.0.2":"2016-09-29T18:43:57.785Z"},"homepage":"https://github.com/parshap/truncate-utf8-bytes#readme","keywords":["truncate","utf8"],"repository":{"type":"git","url":"git+https://github.com/parshap/truncate-utf8-bytes.git"},"contributors":[{"name":"Carl Xiong","email":"xiongc05@gmail.com"},{"name":"Parsha Pourkhomami","email":"parshap@gmail.com"}],"author":{"name":"Carl Xiong","email":"xiongc05@gmail.com"},"bugs":{"url":"https://github.com/parshap/truncate-utf8-bytes/issues"},"license":"WTFPL","readmeFilename":"README.md","users":{"monolithed":true}}