{"_id":"chunk-text","_rev":"178-b284e53424ff7f608c731f9dc5156803","name":"chunk-text","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"chunk-text","version":"1.0.0","author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@1.0.0","maintainers":[{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"dist":{"shasum":"b622426f4f27307fc116706403ff64a8940ed98b","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-1.0.0.tgz","integrity":"sha512-I5Xg7nEetwj6QrMqEUOBvDTHdanpoJqxWR3qOyiZMFuSSZCvbnzg+onFF28eyY7J9gXK/tyPBYYq/ZZFmeHp4w==","signatures":[{"sig":"MEUCIQDF7uFTLlG+R6Q0oGOAeh4TljCVTj1I0U6k5VYRFyNkMgIgPK7mZA33r5aBLzZtsqVk9mKr5GKOFOA8iT8KIR/rXOk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","files":["dist"],"_shasum":"b622426f4f27307fc116706403ff64a8940ed98b","gitHead":"01998d32c5c8d5693a7f3f5743a14c3ebad8d471","scripts":{"lint":"eslint src","test":"yarn run lint && jest","build":"babel src --out-dir dist --ignore __tests__","release":"bin/release.sh","lint:fix":"yarn run lint -- --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"4.1.2","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"7.7.2","devDependencies":{"jest":"^20.0.4","eslint":"^4.0.0","prettier":"^1.4.4","babel-eslint":"^7.2.3","eslint-plugin-jest":"^20.0.3","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^11.0.0","eslint-config-prettier":"^2.2.0","eslint-plugin-prettier":"^2.1.2","conventional-changelog-cli":"^1.3.1"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text-1.0.0.tgz_1497802399100_0.09366404614411294","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"chunk-text","version":"1.0.1","author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@1.0.1","maintainers":[{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"dist":{"shasum":"61d0399fff95fa2087b37b86638d1945f9505b98","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-1.0.1.tgz","integrity":"sha512-KUzl/NChZnOECt84mAQ1xgnc+7HIV99B2JXINKHVG6HKV2NdM3fTXdNV46qMZW5er+o54Ots+vwZQLWlrCq+Sg==","signatures":[{"sig":"MEYCIQCAV2lnU3xwT8A9Np+4hWR6A794lQ4uwodeaOe1NMrfnwIhAKrY+5WNFmLF9SymhJT0IUUDTDipiVL47OdsZC+UyTxs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","files":["dist"],"_shasum":"61d0399fff95fa2087b37b86638d1945f9505b98","gitHead":"3e8b15f80436ecbb64f7b069d289f6ce6d01b334","scripts":{"lint":"eslint src","test":"yarn run lint && jest","build":"babel src --out-dir dist --ignore __tests__","release":"bin/release.sh","lint:fix":"yarn run lint -- --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"4.1.2","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"7.7.2","devDependencies":{"jest":"^20.0.4","eslint":"^4.0.0","prettier":"^1.4.4","babel-eslint":"^7.2.3","eslint-plugin-jest":"^20.0.3","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^11.0.0","eslint-config-prettier":"^2.2.0","eslint-plugin-prettier":"^2.1.2","conventional-changelog-cli":"^1.3.1"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text-1.0.1.tgz_1497802853467_0.6282696414273232","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"chunk-text","version":"1.0.2","author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@1.0.2","maintainers":[{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"dist":{"shasum":"17aa292a7fc75012bcc9ad6a253a5ccd2602da55","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-1.0.2.tgz","integrity":"sha512-3lskbpyVtswDSYheURu+Q62FIdZyun1n28y2oIN72zLEBf1IrXDXpwf7pFXs9kyenWhUUPyqFwIk54D29qxrfA==","signatures":[{"sig":"MEUCIQCtfc617rWGnuF7bbWRwT7+P3e91G4B52oJTqizumgpLQIgLZBB0ebALZA48c+8SLVUr124l6W/Je6WdGvTByYbwIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","files":["dist"],"gitHead":"fbf8084f07f965cefa8584aeee200a6ca26e6ade","scripts":{"lint":"eslint src","test":"yarn run lint && jest","build":"babel src --out-dir dist --ignore __tests__","release":"bin/release.sh","lint:fix":"yarn run lint -- --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"5.0.3","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"7.7.2","devDependencies":{"jest":"^20.0.4","eslint":"^4.0.0","prettier":"^1.4.4","babel-eslint":"^7.2.3","eslint-plugin-jest":"^20.0.3","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^11.0.0","eslint-config-prettier":"^2.2.0","eslint-plugin-prettier":"^2.1.2","conventional-changelog-cli":"^1.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text-1.0.2.tgz_1497815260248_0.6495079123415053","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"chunk-text","version":"1.0.3","author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@1.0.3","maintainers":[{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"dist":{"shasum":"bc250445f852bf0f0aae93389103eebfb8a67a20","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-1.0.3.tgz","integrity":"sha512-L88LZQius40vBFWQDKPc5xH7SGZGUZT7DUV/aiwpGAGbL58094NyvddRDk4D1kP3f1WeZrmFXI2x+wlXxyTPRw==","signatures":[{"sig":"MEUCID15TxJ4I+5UF+chGt+yhM8fYH7FdQ6zobXFdm8zNqNmAiEAyKTPWENV1VJ+3KOjeolwcVdHUqSdll6OJxycrb9ODg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","files":["dist"],"gitHead":"e97e8a3021a793f1aaa3450d2d74eeba492b3b8b","scripts":{"lint":"eslint src","test":"yarn run lint && jest","build":"babel src --out-dir dist --ignore __tests__","release":"bin/release.sh","lint:fix":"yarn run lint -- --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"5.0.3","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"7.7.2","devDependencies":{"jest":"^20.0.4","eslint":"^4.0.0","prettier":"^1.4.4","babel-eslint":"^7.2.3","eslint-plugin-jest":"^20.0.3","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^11.0.0","eslint-config-prettier":"^2.2.0","eslint-plugin-prettier":"^2.1.2","conventional-changelog-cli":"^1.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text-1.0.3.tgz_1497867691399_0.6567387192044407","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"chunk-text","version":"1.0.4","author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@1.0.4","maintainers":[{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"dist":{"shasum":"fc9ad76d11efabdd57518ab5196d0c15dd4035a3","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-1.0.4.tgz","integrity":"sha512-yL3Rl3/EOolQSzJ3DLmypn9oIbacU9C78eokeZFajWUj1rdC5GpC3wTagiBphoTQCxQ2wTxEjUW8RGOOelXsRQ==","signatures":[{"sig":"MEUCIQCwPlEI5KQG4qhCciUm2zxj8Jn02jvLgx5MQAZh2aPiFgIgHv8FU/MbdbyXoIVi1Fh4AvTn3OuSjhtEGP/mlXPTyyY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","files":["dist"],"gitHead":"6eea3e8d84b8f1d94dcefb6ed8b86b205f207c39","scripts":{"lint":"eslint src","test":"yarn run lint && jest","build":"babel src --out-dir dist --ignore __tests__","lint:fix":"yarn run lint -- --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"5.0.3","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"7.7.2","dependencies":{"runes":"^0.4.1"},"devDependencies":{"jest":"^20.0.4","eslint":"^4.0.0","prettier":"^1.4.4","babel-eslint":"^7.2.3","eslint-plugin-jest":"^20.0.3","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^11.0.0","eslint-config-prettier":"^2.2.0","eslint-plugin-prettier":"^2.1.2","conventional-changelog-cli":"^1.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text-1.0.4.tgz_1500481123911_0.19534324295818806","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"chunk-text","version":"1.0.5","author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@1.0.5","maintainers":[{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"dist":{"shasum":"b96ba599efcc6fdbb623e00c5a5c27add14bb608","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-1.0.5.tgz","integrity":"sha512-rgSZNj6nZLkXgUWwcoMyXCm6sTn6B1QhaZyXK/lF2t8TF/lIgLtz5cHpNJBpDXx5x/gvnlqp8l9B7s9fXZG2/w==","signatures":[{"sig":"MEYCIQCW7DwZldbQ5B5+RdS/yBFeg/th3n3IatmBK+go7nbF5gIhAIls7C2aRQBn4wBVfGNO8ijz+ICOhWX/GXbR4JuneUsM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","files":["dist"],"gitHead":"026c138b18aac8f18595e3ac65e9347ca82d1b8b","scripts":{"lint":"eslint src","test":"yarn run lint && jest","build":"babel src --out-dir dist --ignore __tests__","lint:fix":"yarn run lint -- --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"5.3.0","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"7.7.2","dependencies":{"runes":"^0.4.1"},"devDependencies":{"jest":"^20.0.4","eslint":"^4.0.0","prettier":"^1.4.4","babel-eslint":"^7.2.3","eslint-plugin-jest":"^20.0.3","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^11.0.0","eslint-config-prettier":"^2.2.0","eslint-plugin-prettier":"^2.1.2","conventional-changelog-cli":"^1.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text-1.0.5.tgz_1500482004329_0.45250474382191896","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"chunk-text","version":"2.0.0","keywords":["chunk-text","split","chunk","algolia","text","string","array","length","index","size","splice","slice","text-processing","text processing","multi-byte","multibyte","multi","byte","runes","rune","glyphs","glyph","encoding","emoji","MIT"],"author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@2.0.0","maintainers":[{"name":"xavdh","email":"xav.dhalluin@gmail.com"},{"name":"piabdo","email":"cptfracas@gmail.com"},{"name":"mathougui","email":"guillaume.dessain@algolia.com"},{"name":"danajeremy","email":"jeremy.dana@orange.fr"},{"name":"adrian.tofan","email":"adrian.tofan@algolia.com"},{"name":"tatsuro","email":"tatsuro.handa@algolia.com"},{"name":"cyril.descossy","email":"cyril.descossy@algolia.com"},{"name":"matthewbond","email":"matthew.bond@algolia.com"},{"name":"guitek","email":"guillaume.truchot@algolia.com"},{"name":"netgusto","email":"mail@jeromeschneider.fr"},{"name":"olivier-garcia","email":"olivier@lol.cat"},{"name":"maxiloc","email":"maxiloc@gmail.com"},{"name":"maximehuang","email":"maxime.huang@algolia.com"},{"name":"dcoates","email":"dustin@dcoates.com"},{"name":"alexandremeunier","email":"alexandre.meunier@gmail.com"},{"name":"sarahdayan","email":"hello@sarahdayan.com"},{"name":"mschreiber","email":"meschreiber3@gmail.com"},{"name":"sophiem03","email":"manley.sophie@gmail.com"},{"name":"julienbourdeau","email":"julien@sigerr.ch"},{"name":"otomatik","email":"thomas.dalous@gmail.com"},{"name":"jvenezia","email":"veneziajeremy@gmail.com"},{"name":"dispix","email":"me@dispix.net"},{"name":"devinalgolia","email":"devin@algolia.com"},{"name":"amcdaid106","email":"aoife.mcdaid@gmail.com"},{"name":"crawler-team","email":"support+crawler@algolia.com"},{"name":"sylvain","email":"sylvain.bellone@gmail.com"},{"name":"h1fra","email":"bodin.samuel@gmail.com"},{"name":"kombucha","email":"vincentlemeunier+npm@gmail.com"},{"name":"eunjae-lee","email":"karis612@gmail.com"},{"name":"yannickcr","email":"yannick.croissant+npm@gmail.com"},{"name":"e-krebs","email":"emmanuel.krebs@algolia.com"},{"name":"marieglr","email":"marie.gillier@algolia.com"},{"name":"broujo","email":"johann.broudin@gmail.com"},{"name":"lorrissaintgenez","email":"lorris.saint-genez@algolia.com"},{"name":"clemfromspace","email":"clement.denoix@algolia.com"},{"name":"s-pace","email":"sylvain.pace@algolia.com"},{"name":"sylvainh","email":"sylvain.huprelle@algolia.com"},{"name":"seafoox","email":"seafoox@gmail.com"},{"name":"l0aded","email":"oliver.han@algolia.com"},{"name":"tkrugg","email":"contact@ymammar.com"},{"name":"shipow","email":"shipowlata@gmail.com"},{"name":"valentindotxyz","email":"valentin@lespolo.com"},{"name":"mikaa123","email":"misokol123@gmail.com"},{"name":"thomaslef","email":"thomas.lefevre@algolia.com"},{"name":"lukyvj","email":"lucas.bonomi@gmail.com"},{"name":"sepehrf","email":"sepehr9f@gmail.com"},{"name":"kosai106","email":"kevin@oesterkilde.dk"},{"name":"marielaure","email":"marie-laure.sin@algolia.com"},{"name":"redox","email":"sylvain.utard@gmail.com"},{"name":"mthuret","email":"mlthutrix@gmail.com"},{"name":"haroenv","email":"hello@haroen.me"},{"name":"jerska","email":"matthieu.dumont@algolia.com"},{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},{"name":"speedblue","email":"support@algolia.com"},{"name":"raphi","email":"raphael.daguenet@algolia.com"},{"name":"cbaptiste","email":"coquellebaptiste@gmail.com"},{"name":"ronanlevesque","email":"ronan.levesque@gmail.com"},{"name":"samouss","email":"samuel.vllnt@gmail.com"},{"name":"therealwebby","email":"alex@alexjwebb.com"},{"name":"francoischalifour","email":"francois.chalifour@gmail.com"},{"name":"jonmontane","email":"jon@stratus.one"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"bin":{"chunk":"bin/server.js","chunk-text":"bin/server.js"},"dist":{"shasum":"ede9d15cb727e507639be653432498774f490a03","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-2.0.0.tgz","fileCount":4,"integrity":"sha512-0HgIjK0OGQLaMTjQNcigD0TeNjvXZK5zp8+tfJih9IBGyASIYfdYvOlEObJHKqGyR+T3c1HBLG4eW2ra66pEsQ==","signatures":[{"sig":"MEYCIQC0Bo4obt5BXcqm/G9WwOxai+7e021l1cx1RNgz5o6liwIhAL+dbVPMP/MdaO228SciEAPRchCb3Ilr/s2V90LnrQOS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXzGVCRA9TVsSAnZWagAAQRgP/AqKfHCjgycxYPaCoSXH\nXsrRO8CLwdRQwmKM8BTWCEtWc11CkqK8JAzcz0YRMwGi9KTVo1/gxZTfWmIx\nhT4q0YylOKHOu9/s7m8EEQh1gtvl1PLT3r0ZJqeeP/bW6n+15jiTvA8AtJJi\n5o5G4BBBTRxiIcTyvNym7Q5R6BMXkiYX8pq2gMJK4PcwrNQBFiUkelmvBAvy\nvJbpFx30vdogmgLzZnp5OrdzWN15ijwc+nyRfuu+n8wOZjDjdO6/W4bwQQ2b\nPT0T1wggEtatJhsRXyq1BW5ZWiYpcQZWrw9tQlsGYzFtEG6IsXCALmuieZbI\nGmwECm77ca3jdH6Yr3+CQ9si/NmOJY9VhUWPcCzgNSMXPsPLto78nIyCDPIK\nctUQE5fvb0t7daaatYX0sC10+h4Zm5m0nK+DmYx6ngX9aHPPUKhEtfosRXvu\naFnlL3brItktyMxmi4G/AVH6eu4Xi3HDs/DvUzVHPbWFzCu6EAvR2X2oSur1\naMXb2I24p7WavpGh2CeoOyE4jS7AFBL5yAg/j4Bl8w2JHOCuYK7/MFUWUB6B\nbTUdKknlBlDLfOyKoraFIM6+LoW6RuC/3t5bCCZ7rmkA6jeqUAd79fOpHU5g\nY5aZfXiHqL/UNKhQ+/IoCj9r4JxlEBc5rbYG3mFA268gAPNCov/qi1/3xecs\nWhDC\r\n=3X1g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","type":"commonJs","module":"./dist/index.js","exports":{"chunk":"./dist/server.js","import":"./dist/index.js","default":"./dist/index.js","chunk-text":"./dist/server.js"},"gitHead":"9c11369b9271ead0b1680e1f46d7bdd54caaa184","scripts":{"lint":"eslint src","test":"npm run-script lint && jest","build":"babel src --out-dir dist --delete-dir-on-start --ignore \"**/__tests__/*\"","chunk":"npm run-script start","start":"node --unhandled-rejections=strict --trace-warnings ./bin/server.js","lint:fix":"npm run-script lint --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","chunk-text":"npm run-script start","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"haroenv","email":"hello@haroen.me"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"6.14.6","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"12.18.3","dependencies":{"runes":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.1.0","eslint":"7.5.0","prettier":"^2.0.5","@babel/cli":"^7.10.5","babel-core":"6.26.3","babel-jest":"^26.1.0","@babel/core":"^7.10.5","babel-eslint":"10.1.0","babel-loader":"^8.1.0","@babel/runtime":"^7.10.5","@babel/preset-env":"^7.10.4","eslint-plugin-jest":"^23.18.0","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^16.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","conventional-changelog-cli":"^2.0.34","eslint-plugin-eslint-comments":"^3.2.0","babel-plugin-add-module-exports":"^1.0.2","fastestsmallesttextencoderdecoder-encodeinto":"^1.0.22"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text_2.0.0_1600074132767_0.7973552764773402","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"chunk-text","version":"2.0.1","keywords":["chunk-text","split","chunk","algolia","text","string","array","length","index","size","splice","slice","text-processing","text processing","multi-byte","multibyte","multi","byte","runes","rune","glyphs","glyph","encoding","emoji","MIT"],"author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","_id":"chunk-text@2.0.1","maintainers":[{"name":"xavdh","email":"xav.dhalluin@gmail.com"},{"name":"piabdo","email":"cptfracas@gmail.com"},{"name":"mathougui","email":"guillaume.dessain@algolia.com"},{"name":"danajeremy","email":"jeremy.dana@orange.fr"},{"name":"adrian.tofan","email":"adrian.tofan@algolia.com"},{"name":"tatsuro","email":"tatsuro.handa@algolia.com"},{"name":"cyril.descossy","email":"cyril.descossy@algolia.com"},{"name":"matthewbond","email":"matthew.bond@algolia.com"},{"name":"guitek","email":"guillaume.truchot@algolia.com"},{"name":"netgusto","email":"mail@jeromeschneider.fr"},{"name":"olivier-garcia","email":"olivier@lol.cat"},{"name":"maxiloc","email":"maxiloc@gmail.com"},{"name":"maximehuang","email":"maxime.huang@algolia.com"},{"name":"dcoates","email":"dustin@dcoates.com"},{"name":"alexandremeunier","email":"alexandre.meunier@gmail.com"},{"name":"sarahdayan","email":"hello@sarahdayan.com"},{"name":"mschreiber","email":"meschreiber3@gmail.com"},{"name":"sophiem03","email":"manley.sophie@gmail.com"},{"name":"julienbourdeau","email":"julien@sigerr.ch"},{"name":"otomatik","email":"thomas.dalous@gmail.com"},{"name":"jvenezia","email":"veneziajeremy@gmail.com"},{"name":"dispix","email":"me@dispix.net"},{"name":"devinalgolia","email":"devin@algolia.com"},{"name":"amcdaid106","email":"aoife.mcdaid@gmail.com"},{"name":"crawler-team","email":"support+crawler@algolia.com"},{"name":"sylvain","email":"sylvain.bellone@gmail.com"},{"name":"h1fra","email":"bodin.samuel@gmail.com"},{"name":"kombucha","email":"vincentlemeunier+npm@gmail.com"},{"name":"eunjae-lee","email":"karis612@gmail.com"},{"name":"yannickcr","email":"yannick.croissant+npm@gmail.com"},{"name":"e-krebs","email":"emmanuel.krebs@algolia.com"},{"name":"marieglr","email":"marie.gillier@algolia.com"},{"name":"broujo","email":"johann.broudin@gmail.com"},{"name":"lorrissaintgenez","email":"lorris.saint-genez@algolia.com"},{"name":"clemfromspace","email":"clement.denoix@algolia.com"},{"name":"s-pace","email":"sylvain.pace@algolia.com"},{"name":"sylvainh","email":"sylvain.huprelle@algolia.com"},{"name":"seafoox","email":"seafoox@gmail.com"},{"name":"l0aded","email":"oliver.han@algolia.com"},{"name":"tkrugg","email":"contact@ymammar.com"},{"name":"shipow","email":"shipowlata@gmail.com"},{"name":"valentindotxyz","email":"valentin@lespolo.com"},{"name":"mikaa123","email":"misokol123@gmail.com"},{"name":"thomaslef","email":"thomas.lefevre@algolia.com"},{"name":"lukyvj","email":"lucas.bonomi@gmail.com"},{"name":"sepehrf","email":"sepehr9f@gmail.com"},{"name":"kosai106","email":"kevin@oesterkilde.dk"},{"name":"marielaure","email":"marie-laure.sin@algolia.com"},{"name":"redox","email":"sylvain.utard@gmail.com"},{"name":"mthuret","email":"mlthutrix@gmail.com"},{"name":"haroenv","email":"hello@haroen.me"},{"name":"jerska","email":"matthieu.dumont@algolia.com"},{"name":"rayrutjes","email":"raymond.rutjes@gmail.com"},{"name":"speedblue","email":"support@algolia.com"},{"name":"raphi","email":"raphael.daguenet@algolia.com"},{"name":"cbaptiste","email":"coquellebaptiste@gmail.com"},{"name":"ronanlevesque","email":"ronan.levesque@gmail.com"},{"name":"samouss","email":"samuel.vllnt@gmail.com"},{"name":"therealwebby","email":"alex@alexjwebb.com"},{"name":"francoischalifour","email":"francois.chalifour@gmail.com"},{"name":"jonmontane","email":"jon@stratus.one"}],"homepage":"https://github.com/algolia/chunk-text#readme","bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"bin":{"chunk":"bin/server.js","chunk-text":"bin/server.js"},"dist":{"shasum":"4d6e9946c6b842f823b504ee25366a6644733272","tarball":"https://registry.npmjs.org/chunk-text/-/chunk-text-2.0.1.tgz","fileCount":5,"integrity":"sha512-ER6TSpe2DT4wjOVOKJ3FFAYv7wE77HA/Ztz88Peiv3lq/2oVMsItYJJsVVI0xNZM8cdImOOTNqlw+LQz7gYdJg==","signatures":[{"sig":"MEUCIGCT7MxJCEDfQENELbEaPCIYRSm2gH1iktkPzeOsL0L6AiEArpHmI/VwOBnrWprJNWmcq0UocSC4hXQXk4LYW0ldswg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYcb0CRA9TVsSAnZWagAAPl4P/iKsTxnyD4Rk0JdtUSgh\nhZH0E64AaSs06+ZOxb62QzEsOaGG23077jo2bcZrNqpcg33n/dDWFR05qwPC\npOtkXY7nWdKMqPNnTfad3uIhi8+f14U00zdCmSmKJYJolnFxPzGTywC/XaoW\nD5FhGyNeLSHC2b/7Oc0mE8zGqplSxZjya2YbBjTCcvlU0TxWO3mxpDd9cJwE\nxrO+6ziL+VM+SwALjyfysBhTRETllHnXm9v6cJWroJvXpHFf3sri+GUDZWVj\nf+T5R3Jrrma5PYtIzE+5MnPmYbiQjk1MWDNmqan15cxJtvuEwrlAIX5zPlz+\nB7mUfDpclsu7LSpjbHYGExXcYkt9ViM2iBMWMEaJt6EISJH/Xa+q+6dstSaB\neF9pN8TjcjM+WwAjNinyXJbujLF05QYdaTv55+9PlVHoiy7zNk3ZemPzfrH1\nikI0/frjXvxaiWCn7e45VQsIbhM4Jfz1FcI4cmE+MERAxuGVy532RivN/9wF\nPyiAaMySuX9IfkvsVaBpIScAT4RFYE9oxIegzdcCUQvRmhNyR+DZU/LrBUKy\nmJiqjStLVpfZyve6bVp6EoeqZb+ns1xKGA6HsGVlTeIHhCfWt/3CL359fggM\n31HzC8TNzndzAah8pmipuLF4pURE0fNY5xvH5ZJ4Yggz01ffi+SYPOe7lAG5\npXoU\r\n=SKiU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","type":"commonJs","module":"./dist/index.js","exports":{"chunk":"./dist/server.js","import":"./dist/index.js","default":"./dist/index.js","chunk-text":"./dist/server.js"},"gitHead":"f9daa8b2142075a2e210b6d0275e7a5f1d90966a","scripts":{"lint":"eslint src","test":"npm run-script lint && jest","build":"babel src --out-dir dist --delete-dir-on-start --ignore \"**/__tests__/*\"","chunk":"npm run-script start","start":"node --unhandled-rejections=strict --trace-warnings ./bin/server.js","lint:fix":"npm run-script lint --fix","changelog":"conventional-changelog --preset angular --infile CHANGELOG.md --same-file","chunk-text":"npm run-script start","prepublishOnly":"npm run-script build","changelog:unreleased":"conventional-changelog --preset angular --output-unreleased"},"_npmUser":{"name":"haroenv","email":"hello@haroen.me"},"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"_npmVersion":"6.14.6","description":"🔪 chunk/split a string by length without cutting/truncating words.","directories":{},"_nodeVersion":"12.18.3","dependencies":{"runes":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.1.0","eslint":"7.5.0","prettier":"^2.0.5","@babel/cli":"^7.10.5","babel-core":"6.26.3","babel-jest":"^26.1.0","@babel/core":"^7.10.5","babel-eslint":"10.1.0","babel-loader":"^8.1.0","@babel/runtime":"^7.10.5","@babel/preset-env":"^7.10.4","eslint-plugin-jest":"^23.18.0","eslint-plugin-import":"^2.3.0","eslint-config-algolia":"^16.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","conventional-changelog-cli":"^2.0.34","eslint-plugin-eslint-comments":"^3.2.0","babel-plugin-add-module-exports":"^1.0.2","fastestsmallesttextencoderdecoder-encodeinto":"^1.0.22"},"_npmOperationalInternal":{"tmp":"tmp/chunk-text_2.0.1_1600243443732_0.856286261332962","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-06-18T16:13:20.009Z","modified":"2026-09-16T10:11:42.270Z","1.0.0":"2017-06-18T16:13:20.009Z","1.0.1":"2017-06-18T16:20:54.443Z","1.0.2":"2017-06-18T19:47:41.136Z","1.0.3":"2017-06-19T10:21:32.447Z","1.0.4":"2017-07-19T16:18:44.810Z","1.0.5":"2017-07-19T16:33:25.471Z","2.0.0":"2020-09-14T09:02:12.877Z","2.0.1":"2020-09-16T08:04:03.882Z"},"bugs":{"url":"https://github.com/algolia/chunk-text/issues"},"author":{"name":"Raymond RUTJES","email":"raymond.rutjes@algolia.com"},"license":"MIT","homepage":"https://github.com/algolia/chunk-text#readme","keywords":["chunk-text","split","chunk","algolia","text","string","array","length","index","size","splice","slice","text-processing","text processing","multi-byte","multibyte","multi","byte","runes","rune","glyphs","glyph","encoding","emoji","MIT"],"repository":{"url":"git+https://github.com/algolia/chunk-text.git","type":"git"},"description":"🔪 chunk/split a string by length without cutting/truncating words.","maintainers":[{"email":"hello@haroen.me","name":"haroenv"},{"email":"contact@ymammar.com","name":"tkrugg"},{"email":"cyril.descossy@algolia.com","name":"cyril.descossy"},{"email":"emmanuel.fortin@algolia.com","name":"emmanuel.fortin"},{"email":"robert.mogos@algolia.com","name":"robertmogos"},{"email":"stephane.jin@algolia.com","name":"jinste"},{"email":"team-event-experiences-engineering@algolia.com","name":"eventexperiences_algolia"},{"email":"admin@algolia.com","name":"alg-admin"},{"email":"michael.bramwell@algolia.com","name":"mbramwell-algolia"},{"email":"vincentalindogan@gmail.com","name":"vincentalindogan"},{"email":"raymond.rutjes@gmail.com","name":"rayrutjes"}],"readme":"Chunk Text\n===\n\n> chunk/split a string by length without cutting/truncating words.\n\n\n``` javascript\nconst out = chunk('hello world how are you?', 7);\n/* ['hello', 'world', 'how are', 'you?'] */\n```\n\n\n## Installation\n\n``` bash\n$ npm install chunk-text\n# yarn add chunk-text\n```\n\n\n## Usage\n\nAll number values are parsed according to `Number.parseInt`.\n\n``` javascript\nconst chunk = require('chunk-text');\n```\n\n#### chunk(text, chunkSize);\n\nChunks the `text` string into an array of strings that each have a maximum length of `chunkSize`.\n\n``` javascript\nconst out = chunk('hello world how are you?', 7);\n/* ['hello', 'world', 'how are', 'you?'] */\n```\n\nIf no space is detected before `chunkSize` is reached, then it will truncate the word to always\nensure the resulting text chunks have at maximum a length of `chunkSize`.\n\n``` javascript\nconst out = chunk('hello world', 4);\n/* ['hell', 'o', 'worl', 'd'] */\n```\n\n#### chunk(text, chunkSize, chunkOptions);\n\nChunks the `text` string into an array of strings that each have a maximum length of `chunkSize`, as determined by `chunkOptions.charLengthMask`.\n\nThe default behavior if `chunkOptions.charLengthMask` is excluded is equal to `chunkOptions.charLengthMask=-1`.\n\nFor single-byte characters, `chunkOptions.charLengthMask` never changes the results.\n\nFor multi-byte characters, `chunkOptions.charLengthMask` allows awareness of multi-byte glyphs according to the following table:\n\n| `chunkOptions.charLengthMask` | result                                                                                                                                                                                          |\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| -1          | - same as default, same as `chunkOptions.charLengthMask=1`<br />- each character counts as 1 towards length                                                                                                         |\n| 0           | - each character counts as the number of bytes it contains                                                                                                                                      |\n| >0          | - each character counts as the number of bytes it contains, up to a limit of `chunkOptions.charLengthMask=N`<br />- a 7-byte ZWJ emoji such as runningPerson+ZWJ+femaleSymbol (🏃🏽‍♀️) counts as 2, when `chunkOptions.charLengthMask=2` |\n\nYou can also substitute from the default `chunkOptions.charLengthType` property of `length` to `TextEncoder`.\n\nThis enables you to pass any object to `chunkOptions.textEncoder` which matches the signature, `chunkOptions.textEncoder.encode(text).length`\n\nIf your environment natively contains the `TextEncoder` prototype and `chunkOptions.textEncoder` isn't provided,\n\nthe module attempts `new TextEncoder()` in order to use this `chunkOptions.charLengthType`.\n\nIf\n\n- `chunkOptions.charLengthType` is set to `TextEncoder`.\n- `chunkOptions.textEncoder` isn't provided.\n- `TextEncoder` prototype isn't provided by the environment.\n\nThen\n\n- `ReferenceError` will occur.\n\nEnd If\n\n``` javascript\n// one woman runner emoji with a colour is seven bytes, or five characters\n// RUNNER(2) + COLOUR(2) + ZJW + GENDER + VS15\n// (actually encodes to 17)\nconst runner = '🏃🏽‍♀️';\n\nconst outDefault = chunk(runner+runner+runner, 4);\n/* [ '🏃🏽‍♀️🏃🏽‍♀️🏃🏽‍♀️' ] */\n\nconst outZero = chunk(runner+runner+runner, 4, { charLengthMask: 0 });\n/* [ '🏃🏽‍♀️', '🏃🏽‍♀️', '🏃🏽‍♀️' ] */\n\nconst outTwo = chunk(runner+runner+runner, 4, { charLengthMask: 2 });\n/* [ '🏃🏽‍♀️🏃🏽‍♀️', '🏃🏽‍♀️' ] */\n\n// FLAG + RAINBOW\n// 2 each as length, 4 each as TextEncoder\n// 4 as length, 8 as TextEncoder\n// Node v14.5.0 does not provide TextEncoder natively.\nconst flags = '🏳️‍🌈🏳️‍🌈';\n\n// \\/ will fail if your environment doesn't already have TextEncoder prototype \\/\nchunk(flags, 8, { charLengthMask: 0, charLengthType: 'TextEncoder' });\n// [ '🏳️‍🌈', '🏳️‍🌈' ]\n// /\\ will fail if your environment doesn't already have TextEncoder prototype /\\\n\nchunk(flags, 4, {\n  charLengthMask: 0,\n  charLengthType: 'TextEncoder',\n  textEncoder: new TextEncoder(),\n})\n// [ '🏳️‍🌈', '🏳️‍🌈' ]\n\nchunk(flags, 999, {\n  charLengthMask: 0,\n  charLengthType: 'TextEncoder',\n  textEncoder: {\n    encode: () => ({ length: 999 }),\n  },\n})\n// [ '🏳️‍🌈', '🏳️‍🌈' ]\n```\n\n## Usage in Algolia context\n\nThis library was created by [Algolia](https://www.algolia.com/) to ease\nthe optimizing of record payload sizes resulting in faster search responses from the API.\n\nIn general, there is always a unique large \"content attribute\" per record,\nand this packages will allow to chunk that content into small chunks of text.\n\nThe text chunks can then be [distributed over multiple records](https://www.algolia.com/doc/faq/basics/how-do-i-reduce-the-size-of-my-records/#faq-section).\n\nHere is an example of how to split an existing record into several ones:\n\n``` javascript\nvar chunk = require('chunk-text');\nvar record = {\n  post_id: 100,\n  content: 'A large chunk of text here'\n};\n\nvar chunks = chunk(record.content, 600); // Limit the chunk size to a length of 600.\nvar records = [];\nchunks.forEach(function(content) {\n  records.push(Object.assign({}, record, {content: content}));\n});\n```\n","readmeFilename":"README.md"}