{"_id":"breakword","_rev":"284761","name":"breakword","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"time":{"modified":"2021-06-03T18:31:49.000Z","created":"2017-05-14T05:25:37.474Z","1.0.5":"2019-11-03T17:50:30.336Z","1.0.4":"2019-11-03T17:43:54.084Z","1.0.3":"2017-05-20T23:55:08.859Z","1.0.2":"2017-05-14T09:29:21.779Z","1.0.1":"2017-05-14T09:16:50.787Z","1.0.0":"2017-05-14T05:25:37.474Z"},"users":{},"author":{"name":"tecfu"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"versions":{"1.0.5":{"name":"breakword","version":"1.0.5","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","main":"dist/main.js","scripts":{"test":"./node_modules/mocha/bin/mocha","lint":"eslint src/*","lint-fix":"eslint src/* --fix","build":"grunt"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"homepage":"https://github.com/tecfu/breakword#readme","devDependencies":{"babel-preset-es2015":"^6.24.1","eslint":"^6.6.0","grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2","grunt-mocha-test":"^0.13.3","mocha":"^5.2.0","chai":"^4.2.0"},"dependencies":{"wcwidth":"^1.0.1"},"gitHead":"1ab98d408c8f56a99705c3586b40dfa93c41a52a","_id":"breakword@1.0.5","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"shasum":"fd420a417f55016736b5b615161cae1c8f819810","size":10672,"noattachment":false,"key":"/breakword/-/breakword-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/breakword/download/breakword-1.0.5.tgz"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/breakword_1.0.5_1572803430210_0.48700283171079173"},"_hasShrinkwrap":false,"publish_time":1572803430336,"_cnpm_publish_time":1572803430336},"1.0.4":{"name":"breakword","version":"1.0.4","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","main":"dist/main.js","scripts":{"test":"./node_modules/mocha/bin/mocha","lint":"eslint src/*","lint-fix":"eslint src/* --fix"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"homepage":"https://github.com/tecfu/breakword#readme","devDependencies":{"babel-preset-es2015":"^6.24.1","eslint":"^6.6.0","grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2","grunt-mocha-test":"^0.13.3","mocha":"^5.2.0","chai":"^4.2.0"},"dependencies":{"wcwidth":"^1.0.1"},"gitHead":"5dd4e821879b380c51db990f188a2b814a566337","_id":"breakword@1.0.4","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"shasum":"640d3fa8ad914a1e0d0733e1139500a08596bb71","size":10263,"noattachment":false,"key":"/breakword/-/breakword-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/breakword/download/breakword-1.0.4.tgz"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/breakword_1.0.4_1572803033957_0.1812795362162387"},"_hasShrinkwrap":false,"publish_time":1572803034084,"_cnpm_publish_time":1572803034084,"deprecated":"Bad filepath to main.js, broken"},"1.0.3":{"name":"breakword","version":"1.0.3","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","main":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"homepage":"https://github.com/tecfu/breakword#readme","devDependencies":{"babel-preset-es2015":"^6.24.1","grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2"},"dependencies":{"wcwidth":"^1.0.1"},"gitHead":"64ea46ec16868fa8082777978a79b0b531bdf7ec","_id":"breakword@1.0.3","_shasum":"71e091bbb78bb4ef003cf3ed2b2e062c6927f7dd","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"dist":{"shasum":"71e091bbb78bb4ef003cf3ed2b2e062c6927f7dd","size":8912,"noattachment":false,"key":"/breakword/-/breakword-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/breakword/download/breakword-1.0.3.tgz"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/breakword-1.0.3.tgz_1495324508446_0.5560904340818524"},"directories":{},"publish_time":1495324508859,"_hasShrinkwrap":false,"_cnpm_publish_time":1495324508859},"1.0.2":{"name":"breakword","version":"1.0.2","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"homepage":"https://github.com/tecfu/breakword#readme","devDependencies":{"babel-preset-es2015":"^6.24.1","grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2"},"dependencies":{"wcwidth":"^1.0.1"},"gitHead":"e09fa33cf3ca53b87c6c086289eb132a2b3073ab","_id":"breakword@1.0.2","_shasum":"fe1420f96ac70e2e2e4328ae847353d3b88db1a0","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"dist":{"shasum":"fe1420f96ac70e2e2e4328ae847353d3b88db1a0","size":8879,"noattachment":false,"key":"/breakword/-/breakword-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/breakword/download/breakword-1.0.2.tgz"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/breakword-1.0.2.tgz_1494754158874_0.9221120849251747"},"directories":{},"publish_time":1494754161779,"_cnpm_publish_time":1494754161779,"_hasShrinkwrap":false},"1.0.1":{"name":"breakword","version":"1.0.1","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"homepage":"https://github.com/tecfu/breakword#readme","devDependencies":{"babel-preset-es2015":"^6.24.1","grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2"},"gitHead":"c7ab0da275dff0283ed03563e139d7d0e51eeab5","_id":"breakword@1.0.1","_shasum":"fa4576a2c792749cb54a1a6214ebb70e64be6574","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"dist":{"shasum":"fa4576a2c792749cb54a1a6214ebb70e64be6574","size":8865,"noattachment":false,"key":"/breakword/-/breakword-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/breakword/download/breakword-1.0.1.tgz"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/breakword-1.0.1.tgz_1494753410532_0.8611766591202468"},"directories":{},"publish_time":1494753410787,"_hasShrinkwrap":false,"_cnpm_publish_time":1494753410787},"1.0.0":{"name":"breakword","version":"1.0.0","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/tecfu/breakword.git"},"keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"homepage":"https://github.com/tecfu/breakword#readme","devDependencies":{"babel-preset-es2015":"^6.24.1","grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2"},"dependencies":{"wcwidth":"^1.0.1"},"gitHead":"2c28f36ce14373e30271825cac86387f8f459d51","_id":"breakword@1.0.0","_shasum":"0de78c3d11a5bd5cd351bb5d64af9404079030cb","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"dist":{"shasum":"0de78c3d11a5bd5cd351bb5d64af9404079030cb","size":9760,"noattachment":false,"key":"/breakword/-/breakword-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/breakword/download/breakword-1.0.0.tgz"},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/breakword-1.0.0.tgz_1494739534961_0.3714511771686375"},"directories":{},"publish_time":1494739537474,"_hasShrinkwrap":false,"_cnpm_publish_time":1494739537474}},"readme":"# breakword\n\nGet index i.e. 0,1,2,... of the character where a word must be broken given it must\nbe wrapped within a certain length of spaces. \n\nUseful because javascript's String.length does not reflect the true width of emojis and wide characters.\n\n## Installation\n\n```\nnpm install breakword \n```\n\n## Examples\n\n1. To find the index of the character to break after if we want to limit our characters fit on a line 3 spaces wide.\n\n```\nvar Breakword = require (\"breakword\");\nvar word = \"打破我的角色三\";\nvar breakIndex = Breakword(word,3); \nconsole.log(breakIndex) //0\n```\nThe result here - 0 - means all the characters before index 0 (in this case only the character 打) can fit in a line 3 spaces long.\n\n## Test\n\n```bash\nnpm test\n```\n\n- Save new test results to test/test.json\n\n```bash\nnpm --save run test\n```\n\n- Display test outputs only\n\n```bash\nnpm --display run test\n```\n\n## Build\n\n```bash\nnpm run-script build\n```\n","_attachments":{},"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"license":"gpl-2.0"}