{"_id":"breakword","_rev":"13-52964abbe02b8c0b504a3b09d6a0ab2f","name":"breakword","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"breakword","version":"1.0.0","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","_id":"breakword@1.0.0","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"0de78c3d11a5bd5cd351bb5d64af9404079030cb","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.0.tgz","integrity":"sha512-KeK/KtWEsVXF5/eS09pA/VRuuwWi4gwiDeibWlMOHeSLZQSXb37oPqRLzeurTo1Q75ufh5J+8GeQgGJgEsBGDg==","signatures":[{"sig":"MEQCIGt6S9/XsfOuMyCi+WJyk5lxHqGhVj4NNONEyzPfM17LAiBreUxEH/RVO3lvzyRLCDGjtiffenBCsCmhOFrq+uWzuA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"0de78c3d11a5bd5cd351bb5d64af9404079030cb","gitHead":"2c28f36ce14373e30271825cac86387f8f459d51","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"3.10.3","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"6.6.0","dependencies":{"wcwidth":"^1.0.1"},"devDependencies":{"grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword-1.0.0.tgz_1494739534961_0.3714511771686375","host":"packages-18-east.internal.npmjs.com"}},"1.0.1":{"name":"breakword","version":"1.0.1","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","_id":"breakword@1.0.1","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"fa4576a2c792749cb54a1a6214ebb70e64be6574","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.1.tgz","integrity":"sha512-4Yb+X6bY+WS8cIejlOe+NJuAK0BkMXTxLSlBob5S6/dnBQOYoeA+N6UqLgMONoq5hrESE8HkgpQvzaSVyV17CA==","signatures":[{"sig":"MEYCIQD7R6/yoSAWexcAsb9nO0mY4msuL3yMqgfbLOkZYcbL9QIhAP4KFAt8hnh0rlhcciKFLQEUC12vhBdouj3xOCID8gGW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"fa4576a2c792749cb54a1a6214ebb70e64be6574","gitHead":"c7ab0da275dff0283ed03563e139d7d0e51eeab5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"3.10.3","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"6.6.0","devDependencies":{"grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword-1.0.1.tgz_1494753410532_0.8611766591202468","host":"packages-12-west.internal.npmjs.com"}},"1.0.2":{"name":"breakword","version":"1.0.2","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","_id":"breakword@1.0.2","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"fe1420f96ac70e2e2e4328ae847353d3b88db1a0","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.2.tgz","integrity":"sha512-tcwDh17YSjkuhJ/4wCJa9KvzH/GXX82Sy+LDaJRMLlJ0wnedHWP3nDRdM0/ZUQhHL1qE968XaLlc1yw/MhG9VA==","signatures":[{"sig":"MEYCIQCfCSrG3J1l/WupvxH9pOAh5Ms9PJ8NgPfy3BXcToO7WAIhAItjpSKhtXL8tQ1GdPO3xiAt6GFFQS4wG51A/ZmuX8Qu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"fe1420f96ac70e2e2e4328ae847353d3b88db1a0","gitHead":"e09fa33cf3ca53b87c6c086289eb132a2b3073ab","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"3.10.3","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"6.6.0","dependencies":{"wcwidth":"^1.0.1"},"devDependencies":{"grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword-1.0.2.tgz_1494754158874_0.9221120849251747","host":"packages-18-east.internal.npmjs.com"}},"1.0.3":{"name":"breakword","version":"1.0.3","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","_id":"breakword@1.0.3","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"71e091bbb78bb4ef003cf3ed2b2e062c6927f7dd","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.3.tgz","integrity":"sha512-8IOjOLBBK4hGIHvDbGEW7C+jpExkSDqB/RfGbun58wB+JT2NtxnDjx/Hys9t5KoXqJolJIG/+a8lLAegZ1gvVQ==","signatures":[{"sig":"MEUCIQC1OLuLgaqwWjNkljzZud+7k5oUihFiwegJ3puvC8n3aAIgHetnmkW6Ivqzmi3RecpBoPzE5sSQ67RaM0MBguBqfWk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"71e091bbb78bb4ef003cf3ed2b2e062c6927f7dd","gitHead":"64ea46ec16868fa8082777978a79b0b531bdf7ec","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"3.10.3","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"6.6.0","dependencies":{"wcwidth":"^1.0.1"},"devDependencies":{"grunt":"^1.0.1","grunt-babel":"^6.0.0","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword-1.0.3.tgz_1495324508446_0.5560904340818524","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"breakword","version":"1.0.4","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","_id":"breakword@1.0.4","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"640d3fa8ad914a1e0d0733e1139500a08596bb71","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.4.tgz","fileCount":10,"integrity":"sha512-Qf7RT4hE5l1lIcqzLgc91pIwyuSDVAFPG6nQOLy0ElBcsU1BQxrYIj0rJJ9CE8HXk13k6Eaa8hJ2f416MHFUBw==","signatures":[{"sig":"MEQCIEcT/TUVrRtVH2+iq72rPoxLVvIRJSlBHpbzPo+e/K8xAiBwCU9G5nVgFel8661e/8UzOsnGkbRVxQkIIuFZWdzzyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvxHaCRA9TVsSAnZWagAAf5UP/1FKLcZ7KBBfo/+tPsBr\nLnS8U7mOCUb0LgVV5Zr+C0tRrVd9ZE+VSS0lujg0xva4LlsPgPX5bcDtfxor\n1q7S05EcVkjmlrkyJLPmaDCC1UqirVkV5KAXiNhoPR+BApbJAlmCj92aHE7T\n9KozyAIBKgNnuqLkBZ9Gm5kUuFVdMUOHq4UlcqZ8oY+Jp89XfHoavyZ/QXKF\nVOCl6FDjf/5NBoRF+qW+gXGkhsnnFDIx61zG5sfyuVTNZOZN1r/frBdIdgl7\nZKeomNR9ghP/tnMZbZMJaDh+Dj61w0oXE+V74jWvkQ1ZLxnH51dmx3uNI8Wr\nbPPFTsN3IzRPWIlSixmW1aSv9x2k4jZsPqI3MMIBx7rG7FihiAaEnzGOOVDg\nSW00RH3TWwpYIpJV4NlC7rj++1R2cOkGJwy4q5YV15ydza9QaS8JPMUU+pxT\nrureJ8radr03MNB2BuUcuo+bQ+7Lzk1blF3N6kqrrToHLXedzHYp1OCNGAAm\ninE71O8ndWr0qHRVR5JPpz9DXgmj4vGIdMpZ0lbaNpIlFaWH3xPWplLVr3nE\nuy9LXoAmB8E8FWwzaMcDwkAJgSVqVqcsMQEvegxX6v5cQDR3E8NPL4Suecte\n2kZRQxg/gIOdrr4zyxEFEpKVaemyRFIl1GeJGU/hOPDWW++GCjjKuFDiMfEH\nU3sg\r\n=twFP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main.js","gitHead":"5dd4e821879b380c51db990f188a2b814a566337","scripts":{"lint":"eslint src/*","test":"./node_modules/mocha/bin/mocha","lint-fix":"eslint src/* --fix"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"deprecated":"Bad filepath to main.js, broken","repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"6.10.2","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"12.9.1","dependencies":{"wcwidth":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","grunt":"^1.0.1","mocha":"^5.2.0","eslint":"^6.6.0","grunt-babel":"^6.0.0","grunt-mocha-test":"^0.13.3","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword_1.0.4_1572803033957_0.1812795362162387","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"breakword","version":"1.0.5","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"gpl-2.0","_id":"breakword@1.0.5","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"fd420a417f55016736b5b615161cae1c8f819810","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.5.tgz","fileCount":12,"integrity":"sha512-ex5W9DoOQ/LUEU3PMdLs9ua/CYZl1678NUkKOdUSi8Aw5F1idieaiRURCBFJCwVcrD1J8Iy3vfWSloaMwO2qFg==","signatures":[{"sig":"MEYCIQCUmbTcoK1Ruz5JDK+4Ne5yLSce59yEow75cLFoyy29WgIhAJzdGRiGDc50IUPIt55dnb6zO8Ag0R+H26pOSUyEl1WQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvxNmCRA9TVsSAnZWagAA7kAQAJvUEPpY1a2ksfk5cGG2\nz68mMj/+9CW/X9RNVp04B9hvfqZUSAYqFXRk5X0YDt/b9pJHhYbgSTzitoMK\nSgqJ6Pu4OC4v+oqjjegB/Bt3yX2SEYONvxcoHfO2IWgpjpDFmDZDgBHRJoM9\nnShB+Z5sSMyp/oOqOO67Zd7QyRP1VJp/+hfXp/i+hCX842M1kF83IVYT/tOS\naMP8QYKwTFWjtW31DU6ZA88+u9lw+cCClmyLsOEtZ9K77hlFzfr+2JisRzyL\nyHAjYv61LflC3VXrz6g0GWa4HelljbRvLzopjAgSYpaz141sprzk/jgBIVCg\nqpj8eNGYMl4DL0GrijllOC7EmyidtfhKg4llUo0oD/aI1fCWizo/NQFm6+1H\nk1gt7RLzZvDMKV8HRyOPwnaKZjS8ff5+UrmzuBB0K0UC7HdzK3esAWE8AvA9\nxeiVSpDf/cGDA25jwTDhP/WtId85tEAUUBfiA1IsWqVRyUaEqGy1HNm0MlHX\nWQlxicEFKByEUWAcSJ6AKrTG2ohd1lRRc+f87JSLr99y8RC6ci2pdiNnQ4WB\nXd21l8tKA8CHoEtayUCnx+3ibx4tk7Jg1IxwCKajUwvV5j3qASaiyly+uDtS\nrgVr8Xmnp+Nb9rVsyo4FduUsbOdEoJEJufqpXNMQicxwInK00KQ2X9t79BBF\nUIjT\r\n=xBEU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main.js","gitHead":"1ab98d408c8f56a99705c3586b40dfa93c41a52a","scripts":{"lint":"eslint src/*","test":"./node_modules/mocha/bin/mocha","build":"grunt","lint-fix":"eslint src/* --fix"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"6.10.2","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"12.9.1","dependencies":{"wcwidth":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","grunt":"^1.0.1","mocha":"^5.2.0","eslint":"^6.6.0","grunt-babel":"^6.0.0","grunt-mocha-test":"^0.13.3","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword_1.0.5_1572803430210_0.48700283171079173","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"breakword","version":"1.0.6","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"MIT","_id":"breakword@1.0.6","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"242506e7b871b7fad1bce8dc05cb0f2a129c12bd","tarball":"https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz","fileCount":18,"integrity":"sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==","signatures":[{"sig":"MEUCIQDH4+dN6o/KdsSomHMiyLaYH4CbBajrqB2v5DcTGqDcywIgQzpzVmgs6X3nl9WY2OrjZpqR4j2fykvzHSRrtwOA0dk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15053},"main":"dist/main.js","gitHead":"3de7aa2256a92bd275a3b0d46bc30feaaa8b0a50","scripts":{"lint":"eslint src/*","test":"./node_modules/mocha/bin/mocha","build":"grunt","coverage":"nyc mocha","lint-fix":"eslint src/* --fix","prepublishOnly":"npm run build"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"9.5.0","description":"Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).","directories":{},"_nodeVersion":"18.15.0","dependencies":{"wcwidth":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.2.0","grunt":"^1.0.1","husky":"^4.2.3","mocha":"^5.2.0","eslint":"^6.6.0","grunt-babel":"^6.0.0","grunt-mocha-test":"^0.13.3","load-grunt-tasks":"^3.5.2","babel-preset-es2015":"^6.24.1"},"_npmOperationalInternal":{"tmp":"tmp/breakword_1.0.6_1685433009357_0.7526919668127197","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"breakword","version":"2.0.0","keywords":["wordbreak","break-word","textwrap"],"author":{"name":"tecfu"},"license":"MIT","_id":"breakword@2.0.0","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"homepage":"https://github.com/tecfu/breakword#readme","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"067b79f4ee5329fb89b90687a758af928e0522bf","tarball":"https://registry.npmjs.org/breakword/-/breakword-2.0.0.tgz","fileCount":4,"integrity":"sha512-VymEAvfXUEc0M72RHOdP5X3emzXTwY/Va10QAnnhUP833I2YGtWE8eSytkGWweYHRPP73ZGwaL9EVguUp3v/Wg==","signatures":[{"sig":"MEUCICSqXBp80Zdc8VCwtpASAZaXxCg1Um8oxQFxHWWZOSZ5AiEApR9RG2ysDRSR9ksEM4KliNm4m0ggYVSfhhu5N1/MZT8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCID615wPbXjfTMkivQK/GrLCLWXG9JTWvQ/vbDapi9lz6AiBwAU4yI4t3llGT+RJQE9X2KyhfWjmypEq7uZOnXRUrsg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11851},"main":"src/main.js","engines":{"node":">=22"},"exports":{".":"./src/main.js"},"gitHead":"5ea129a5fe68bd130a9566b3f205b5818893f212","scripts":{"test":"node --test","check:unicode":"node tools/gen-wide.mjs --check","regen:unicode":"node tools/gen-wide.mjs","prepublishOnly":"npm test"},"_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"11.19.0","description":"Get the character index where a word must be broken to fit within a given display width.","directories":{},"_nodeVersion":"26.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/breakword_2.0.0_1789924698181_0.9939774995358319","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"_id":"breakword@2.1.0","bugs":{"url":"https://github.com/tecfu/breakword/issues"},"dist":{"shasum":"deb61f5ff70cb8ce891166755babbc237ffecfbf","tarball":"https://registry.npmjs.org/breakword/-/breakword-2.1.0.tgz","fileCount":4,"integrity":"sha512-JIramveyyRMs4kXeZj668g2N0HPSvkMBd1rj0C/LhpXh1PIIEc0RsJYey5OhNY2Zk1hTVIgTHZ2aoSKGAr0Fug==","signatures":[{"sig":"MEUCIQDlzy5Hna3zX/ZzxLv0K+7uLk0ODezx6MJuXVoNWFpkSAIgOyllfAWHdd+OqP2/3G72QnO3ZpEM1oCohR3DE+C9EkI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDS5zfkc30Hzt/bccW8Ey0eal382ziIXwiWOGrR8KPaegIgZx2N81SzBmpXbpqkhiF6pJClxhCuElYwRt7EAVyI63Y="}],"unpackedSize":12998},"main":"src/main.js","name":"breakword","author":{"name":"tecfu"},"engines":{"node":">=22"},"exports":{".":"./src/main.js"},"gitHead":"49a683e4643b8fc7547ef80ca9b08d59f7ed9a39","license":"MIT","scripts":{"test":"node --test","check:unicode":"node tools/gen-wide.mjs --check","regen:unicode":"node tools/gen-wide.mjs","prepublishOnly":"npm test"},"version":"2.1.0","_npmUser":{"name":"tecfu","email":"help@tecfu.com"},"homepage":"https://github.com/tecfu/breakword#readme","keywords":["wordbreak","break-word","textwrap"],"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"_npmVersion":"11.19.0","description":"Get the character index where a word must be broken to fit within a given display width.","directories":{},"maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"_nodeVersion":"26.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/breakword_2.1.0_1789929240264_0.024105489783517786"}}},"time":{"created":"2017-05-14T05:25:37.474Z","modified":"2026-09-20T18:34:00.490Z","1.0.0":"2017-05-14T05:25:37.474Z","1.0.1":"2017-05-14T09:16:50.787Z","1.0.2":"2017-05-14T09:29:21.779Z","1.0.3":"2017-05-20T23:55:08.859Z","1.0.4":"2019-11-03T17:43:54.084Z","1.0.5":"2019-11-03T17:50:30.336Z","1.0.6":"2023-05-30T07:50:09.498Z","2.0.0":"2026-09-20T17:18:18.267Z","2.1.0":"2026-09-20T18:34:00.340Z"},"bugs":{"url":"https://github.com/tecfu/breakword/issues"},"author":{"name":"tecfu"},"license":"MIT","homepage":"https://github.com/tecfu/breakword#readme","keywords":["wordbreak","break-word","textwrap"],"repository":{"url":"git+https://github.com/tecfu/breakword.git","type":"git"},"description":"Get the character index where a word must be broken to fit within a given display width.","maintainers":[{"name":"tecfu","email":"help@tecfu.com"}],"readme":"# breakword\n\nGet the zero-based index of the character after which a word must be broken so that the portion before the break fits within a given display width. Width is measured in terminal cells rather than in JavaScript's UTF-16 `String.length`, so wide characters and emoji are accounted for.\n\nZero dependencies: the wide/fullwidth ranges ship inlined in the source, so there is nothing to install and nothing to audit.\n\n## Display width is a policy\n\nThere is no universal answer. UAX #11, which defines East Asian Width, describes it as a hint that implementations are expected to tailor, so this module states what it assumes:\n\n| cells | |\n|---|---|\n| 2 | East Asian Width `W` or `F`, plus emoji that UAX #51 gives the emoji presentation by default (`⭐`, `😀`) |\n| 1 | everything else, including `A` (ambiguous) and the astral plane's non-CJK blocks (`𝕏`, Deseret, musical symbols), which are `Na` |\n| 0 | combining marks, format characters, C0/C1 controls |\n\nTwo consequences worth knowing before you depend on it. Ambiguous characters (`U+00A1`, Thai, Greek and others) count as 1, which is right for a Western locale and one cell short of what a CJK locale renders. And a regional indicator counts as 1 on its own, so a pair — the way a flag is encoded — sums to the 2 cells one flag glyph occupies.\n\nThe per-code-point model also cannot see clusters, so a ZWJ sequence (`👨‍👩‍👧`) is charged for each member and a base promoted by `U+FE0F` (`❤️`) stays at 1. Those are pinned by the regressions in `test/test.js`; grapheme-aware measurement is tracked in [#21](https://github.com/tecfu/breakword/issues/21).\n\n## Installation\n\n```bash\nnpm install breakword\n```\n\n## Usage\n\n```js\nconst breakword = require('breakword');\n\nconst word = '打破我的角色三';\nconst breakIndex = breakword(word, 3);\n\nconsole.log(breakIndex); // 0\n```\n\nThe returned value is a **zero-based Unicode code-point index**. A result of `0` means the break occurs immediately before the character at index `0`; in the example above, only `打` fits within a display width of 3, so the break is before `破`.\n\nThe function accepts values that can be converted to strings, including numbers:\n\n```js\nbreakword(2.1, 1); // 0\n```\n\n`breakword.width(char)` returns the display width (0, 1 or 2 terminal cells) of a single code point, for consumers that measure text themselves. It accepts a string containing zero or one Unicode code point; unlike the main `breakword()` API, it does not coerce non-string values:\n\n```js\nconst width = (str) => [...str].reduce((n, c) => n + breakword.width(c), 0);\nwidth('打破a\\u200d'); // 5\n```\n\n## Development\n\nTests use Node.js's built-in test runner, so no test framework or build step is required.\n\n```bash\nnpm test\n```\n\nSupported Node.js versions are the current maintained LTS releases beginning with Node.js 22.\n\n`test/` is split by what it trusts: `test.js` exercises the public API, `unicode.test.mjs` checks the width rules against Unicode properties over the whole code point range, and `gen-wide.test.mjs` checks the generated table's integrity against a fixture. Nothing in the suite reaches the network.\n\n### The Unicode table\n\n`src/main.js` carries the `W`/`F` ranges from one pinned Unicode release, recorded in the generated block. The generator is pinned so a review can reproduce the table exactly:\n\n```bash\nnpm run regen:unicode              # tools/gen-wide.mjs, pinned release\nnpm run check:unicode              # fail if src/main.js is not reproducible\nnode tools/gen-wide.mjs 17.0.0     # a specific release\nnode tools/gen-wide.mjs --check    # same as the npm script\n```\n\nRegenerating is a deliberate act: it can move break indices, so the table, the pinned version and the expectations in `test/unicode.test.mjs` move together, and the release is a major version. CI runs `check:unicode` so a stale table fails the build rather than sitting in the source.\n\n## Release\n\nThe package ships the source module directly. `npm publish` runs the test suite before publishing.\n","readmeFilename":"README.md"}