{"_id":"stringz","_rev":"4079402","name":"stringz","description":"Zero-dependency unicode-aware string tools","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"sallar","email":""}],"time":{"modified":"2025-10-16T23:03:37.000Z","created":"2016-07-29T16:27:30.521Z","2.1.0":"2020-02-21T14:17:06.614Z","2.0.0":"2019-05-26T10:36:10.168Z","1.0.0":"2018-04-02T19:52:03.743Z","0.4.0":"2017-12-08T17:36:16.933Z","0.3.0":"2017-11-29T20:20:38.201Z","0.2.3":"2017-09-19T18:06:02.956Z","0.2.2":"2017-06-20T17:51:55.665Z","0.2.1":"2017-05-26T22:12:41.572Z","0.2.0":"2017-04-30T12:35:13.682Z","0.1.2":"2017-04-25T15:02:57.589Z","0.1.1":"2016-07-30T21:06:40.291Z","0.1.0":"2016-07-29T16:27:30.521Z"},"users":{},"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"versions":{"2.1.0":{"name":"stringz","version":"2.1.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"jest --coverage","format":"prettier --write '{src,test,benchmark}/**/*.{js,ts}'","lint":"prettier-check '{src,test,benchmark}/**/*.{js,ts}'","nyc-report":"codecov","precommit":"lint-staged","prepublish":"npm run build","build":"tsc"},"lint-staged":{"{src,test,benchmark}/**/*.{js,ts}":["prettier --write","git add"]},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"@types/assert":"^1.4.2","@types/jest":"^24.0.13","codecov":"^3.5.0","husky":"^2.3.0","jest":"^24.8.0","lint-staged":"^8.1.7","prettier":"^1.9.1","prettier-check":"^2.0.0","ts-jest":"^24.0.2","typescript":"^3.4.5"},"dependencies":{"char-regex":"^1.0.2"},"gitHead":"87bc753df068eb0633c6e85d92e2283053572c30","_id":"stringz@2.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"shasum":"5896b4713eac31157556040fb90258fb02c1630c","size":5899,"noattachment":false,"key":"/stringz/-/stringz-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-2.1.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz_2.1.0_1582294626500_0.07388213659168219"},"_hasShrinkwrap":false,"publish_time":1582294626614,"_cnpm_publish_time":1582294626614,"_cnpmcore_publish_time":"2021-12-16T15:48:57.259Z"},"2.0.0":{"name":"stringz","version":"2.0.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","scripts":{"test":"jest --coverage","format":"prettier --write '{src,test,benchmark}/**/*.{js,ts}'","lint":"prettier-check '{src,test,benchmark}/**/*.{js,ts}'","nyc-report":"codecov","precommit":"lint-staged","prepublish":"npm run build","build":"tsc"},"lint-staged":{"{src,test,benchmark}/**/*.{js,ts}":["prettier --write","git add"]},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"@types/assert":"^1.4.2","@types/jest":"^24.0.13","codecov":"^3.5.0","husky":"^2.3.0","jest":"^24.8.0","lint-staged":"^8.1.7","prettier":"^1.9.1","prettier-check":"^2.0.0","ts-jest":"^24.0.2","typescript":"^3.4.5"},"dependencies":{"unicode-astral-regex":"^1.0.1"},"gitHead":"e9b3312f090c8c7336ee12f29aa492857367b016","_id":"stringz@2.0.0","_npmVersion":"6.5.0","_nodeVersion":"11.8.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"0a092bc64ed9b42eff2936d0401d2398393d54e9","size":5905,"noattachment":false,"key":"/stringz/-/stringz-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-2.0.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz_2.0.0_1558866970052_0.7200694574485924"},"_hasShrinkwrap":false,"publish_time":1558866970168,"_cnpm_publish_time":1558866970168,"_cnpmcore_publish_time":"2021-12-16T15:48:57.462Z"},"1.0.0":{"name":"stringz","version":"1.0.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"./index.d.ts","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","format":"prettier --write '{src,test,benchmark}/**/*.js'","lint":"prettier-check '{src,test,benchmark}/**/*.js'","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","precommit":"lint-staged","prepublish":"babel src --out-dir dist"},"lint-staged":{"{src,test,benchmark}/**/*.js":["prettier --write","git add"]},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","husky":"^0.14.3","lint-staged":"^6.0.0","mocha":"^2.5.3","nyc":"^7.1.0","prettier":"^1.9.1","prettier-check":"^2.0.0"},"dependencies":{"unicode-astral-regex":"^1.0.1"},"gitHead":"26ae176942674f18696a6561021478313b73e14e","_id":"stringz@1.0.0","_npmVersion":"5.8.0","_nodeVersion":"9.9.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"d2acba994e4ce3c725ee15c86fff4281280d2025","size":35832,"noattachment":false,"key":"/stringz/-/stringz-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-1.0.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz_1.0.0_1522698723673_0.4973670822054628"},"_hasShrinkwrap":false,"publish_time":1522698723743,"_cnpm_publish_time":1522698723743,"_cnpmcore_publish_time":"2021-12-16T15:48:57.790Z"},"0.4.0":{"name":"stringz","version":"0.4.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"./index.d.ts","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","format":"prettier --write '{src,test,benchmark}/**/*.js'","lint":"prettier-check '{src,test,benchmark}/**/*.js'","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","precommit":"lint-staged","prepublish":"babel src --out-dir dist"},"lint-staged":{"{src,test,benchmark}/**/*.js":["prettier --write","git add"]},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","husky":"^0.14.3","lint-staged":"^6.0.0","mocha":"^2.5.3","nyc":"^7.1.0","prettier":"^1.9.1","prettier-check":"^2.0.0"},"dependencies":{},"gitHead":"17f1cc8d81f71439d6c63f7c267f45f83b51a03d","_id":"stringz@0.4.0","_npmVersion":"5.5.1","_nodeVersion":"8.1.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"6e0543788f1076c2babc498ec5acd320e3601ac9","size":49041,"noattachment":false,"key":"/stringz/-/stringz-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.4.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz-0.4.0.tgz_1512754576833_0.49605667032301426"},"directories":{},"publish_time":1512754576933,"_hasShrinkwrap":false,"_cnpm_publish_time":1512754576933,"_cnpmcore_publish_time":"2021-12-16T15:48:58.041Z"},"0.3.0":{"name":"stringz","version":"0.3.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"./index.d.ts","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","lint":"eslint ./","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","eslint":"^3.19.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.2.0","eslint-plugin-node":"^4.2.2","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"dependencies":{},"gitHead":"3ed18bca7de47a34f40cc92eccb7d9d1e0275ee3","_id":"stringz@0.3.0","_npmVersion":"5.5.1","_nodeVersion":"8.1.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"58a311a8c791eee1a68f5f188b3db5e66ff49360","size":48590,"noattachment":false,"key":"/stringz/-/stringz-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.3.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz-0.3.0.tgz_1511986838082_0.703529748134315"},"directories":{},"publish_time":1511986838201,"_hasShrinkwrap":false,"_cnpm_publish_time":1511986838201,"_cnpmcore_publish_time":"2021-12-16T15:48:58.496Z"},"0.2.3":{"name":"stringz","version":"0.2.3","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"./index.d.ts","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","lint":"eslint ./","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","eslint":"^3.19.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.2.0","eslint-plugin-node":"^4.2.2","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"dependencies":{},"gitHead":"f6bcafb4c6720c1efebab014c87b73b543fc3765","_id":"stringz@0.2.3","_npmVersion":"5.3.0","_nodeVersion":"8.1.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"87bad6f5462c34bd73f84522c703f019d78f0b2d","size":46457,"noattachment":false,"key":"/stringz/-/stringz-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.2.3.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz-0.2.3.tgz_1505844361879_0.110933608841151"},"directories":{},"publish_time":1505844362956,"_hasShrinkwrap":false,"_cnpm_publish_time":1505844362956,"_cnpmcore_publish_time":"2021-12-16T15:48:58.878Z"},"0.2.2":{"name":"stringz","version":"0.2.2","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"./index.d.ts","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","lint":"eslint ./","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","eslint":"^3.19.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.2.0","eslint-plugin-node":"^4.2.2","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"dependencies":{},"gitHead":"e3a6071824978a9d337c477183db51eb2c471187","_id":"stringz@0.2.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"0c23c48c4933928be4fee8e2c83f71c3b1e077ba","size":46375,"noattachment":false,"key":"/stringz/-/stringz-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.2.2.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz-0.2.2.tgz_1497981114458_0.9817261453717947"},"directories":{},"publish_time":1497981115665,"_hasShrinkwrap":false,"_cnpm_publish_time":1497981115665,"_cnpmcore_publish_time":"2021-12-16T15:48:59.158Z"},"0.2.1":{"name":"stringz","version":"0.2.1","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","types":"./index.d.ts","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","lint":"eslint ./","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/stringz.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/stringz/issues"},"homepage":"https://github.com/sallar/stringz#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","eslint":"^3.19.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.2.0","eslint-plugin-node":"^4.2.2","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"dependencies":{},"gitHead":"de5dcd99dd9f1e816a536891ec2481cdda9d60cb","_id":"stringz@0.2.1","_shasum":"9f134564e086b4a35f99b6efc1dd88a8d9cb7e4e","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"9f134564e086b4a35f99b6efc1dd88a8d9cb7e4e","size":46330,"noattachment":false,"key":"/stringz/-/stringz-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.2.1.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stringz-0.2.1.tgz_1495836760399_0.570644963067025"},"directories":{},"publish_time":1495836761572,"_hasShrinkwrap":false,"_cnpm_publish_time":1495836761572,"_cnpmcore_publish_time":"2021-12-16T15:48:59.488Z"},"0.2.0":{"name":"stringz","version":"0.2.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","scripts":{"test":"npm run lint && nyc --require babel-core/register mocha","lint":"eslint ./","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/limit-string-length.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/limit-string-length/issues"},"homepage":"https://github.com/sallar/limit-string-length#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","eslint":"^3.19.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.2.0","eslint-plugin-node":"^4.2.2","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"dependencies":{},"gitHead":"cdebc3e3874f3b0b03d85ea014b0aac7a71b6270","_id":"stringz@0.2.0","_shasum":"f228f85e108b6da2c9001ecc94c835ca4ee58d1b","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"f228f85e108b6da2c9001ecc94c835ca4ee58d1b","size":45974,"noattachment":false,"key":"/stringz/-/stringz-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.2.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stringz-0.2.0.tgz_1493555711898_0.5893437839113176"},"directories":{},"publish_time":1493555713682,"_hasShrinkwrap":false,"_cnpm_publish_time":1493555713682,"_cnpmcore_publish_time":"2021-12-16T15:48:59.744Z"},"0.1.2":{"name":"stringz","version":"0.1.2","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","scripts":{"test":"nyc --require babel-core/register mocha","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/limit-string-length.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/limit-string-length/issues"},"homepage":"https://github.com/sallar/limit-string-length#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"gitHead":"ffc33256168d274e7f296a49f6bd9dd00256a259","_id":"stringz@0.1.2","_shasum":"016e9b15d64eecf8ec1a1849b6ed47c5cd91042f","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"016e9b15d64eecf8ec1a1849b6ed47c5cd91042f","size":18091,"noattachment":false,"key":"/stringz/-/stringz-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.1.2.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stringz-0.1.2.tgz_1493132575884_0.3925639649387449"},"directories":{},"publish_time":1493132577589,"_hasShrinkwrap":false,"_cnpm_publish_time":1493132577589,"_cnpmcore_publish_time":"2021-12-16T15:48:59.973Z"},"0.1.1":{"name":"stringz","version":"0.1.1","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","scripts":{"test":"nyc --require babel-core/register mocha","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/limit-string-length.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/limit-string-length/issues"},"homepage":"https://github.com/sallar/limit-string-length#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"gitHead":"20078a36684c6d6b50bd584f2c95e25fa10746e8","_id":"stringz@0.1.1","_shasum":"02e190d85cc78547e761b7e7976cc0e9000f0cd6","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"02e190d85cc78547e761b7e7976cc0e9000f0cd6","size":17998,"noattachment":false,"key":"/stringz/-/stringz-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.1.1.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stringz-0.1.1.tgz_1469912798268_0.23874783306382596"},"directories":{},"publish_time":1469912800291,"_hasShrinkwrap":false,"_cnpm_publish_time":1469912800291,"_cnpmcore_publish_time":"2021-12-16T15:49:00.153Z"},"0.1.0":{"name":"stringz","version":"0.1.0","description":"Zero-dependency unicode-aware string tools","main":"dist/index.js","scripts":{"test":"nyc --require babel-core/register mocha","nyc-report":"nyc report --reporter=lcov > coverage.lcov && codecov","prepublish":"babel src --out-dir dist"},"repository":{"type":"git","url":"git+https://github.com/sallar/limit-string-length.git"},"keywords":["string","truncate","length","unicode","substr","substring","emoji","pad","leftpad","rightpad","length","count"],"author":{"name":"Sallar Kaboli","email":"sallar.kaboli@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/sallar/limit-string-length/issues"},"homepage":"https://github.com/sallar/limit-string-length#readme","devDependencies":{"babel-cli":"^6.11.4","babel-core":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.9.0","codecov":"^1.0.1","mocha":"^2.5.3","nyc":"^7.1.0"},"gitHead":"2efb25820bb9b7de6d57dd3597081ef3102e4cc4","_id":"stringz@0.1.0","_shasum":"045067f51c434d37ddb2deea1d8e95f45982898f","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"sallar","email":"sallar.kaboli@gmail.com"},"dist":{"shasum":"045067f51c434d37ddb2deea1d8e95f45982898f","size":4715,"noattachment":false,"key":"/stringz/-/stringz-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stringz/download/stringz-0.1.0.tgz"},"maintainers":[{"name":"sallar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stringz-0.1.0.tgz_1469809648499_0.38646881841123104"},"directories":{},"publish_time":1469809650521,"_hasShrinkwrap":false,"_cnpm_publish_time":1469809650521,"_cnpmcore_publish_time":"2021-12-16T15:49:00.379Z"}},"readme":"# Stringz [![Build Status](https://travis-ci.org/sallar/stringz.svg?branch=master)](https://travis-ci.org/sallar/stringz) [![codecov](https://codecov.io/gh/sallar/stringz/branch/master/graph/badge.svg)](https://codecov.io/gh/sallar/stringz) [![npm](https://img.shields.io/npm/dm/stringz.svg)](https://www.npmjs.com/package/stringz)\n\nA really small, performant, unicode-aware library for working\nwith Strings in Node.js.\n\nJavascript has a serious problem with unicode. Even ES6 can’t solve the problem\nentirely since some characters like the new colored emojis are three bytes\ninstead of two bytes. Sometimes even more! `\"????????\".length` returns `4` which is\ntotally wrong (hint: it should be 1!). ES6's `Array.from` tried to solve this,\nbut that even fails: `Array.from(\"????????\")` returns `[\"????\", \"????\"]` which is\nincorrect. This library tries to tackle all these problems with a mega RegExp.\n[Read More Here](https://mathiasbynens.be/notes/javascript-unicode).\n\n## Features\n\n* Unicode-aware string manipulation tools\n* High performance\n\n## Install\n\n```bash\n$ npm install stringz --save\n```\n\nAnd import it in your awesome node app:\n\n```javascript\n// ES2015+\nimport * as stringz from 'stringz'; // OR:\nimport { limit, substring, length, substr } from 'stringz';\n```\n\n```javascript\n// CommonJS\nconst stringz = require('stringz'); // OR:\nconst { limit, substr } = require('stringz');\n```\n\n## Usage\n\n* [`limit()`](#limit-string-to-width)\n* [`length()`](#string-length)\n* [`substring()`](#substring)\n* [`substr()`](#substr)\n* [`indexOf()`](#indexof)\n* [`toArray()`](#toarray)\n\n### Limit String to Width\n\n    function limit(str[, limit[, padStr[, padPosition]]])\n\n| Param       | Type                | Default              | Description                                               |\n| ----------- | ------------------- | -------------------- | --------------------------------------------------------- |\n| str         | <code>String</code> | _none_               | The string to be limited                                  |\n| limit       | <code>Number</code> | <code>16</code>      | Desired string length                                     |\n| padStr      | <code>String</code> | <code>\"#\"</code>     | Character to pad the output with                          |\n| padPosition | <code>String</code> | <code>\"right\"</code> | Pad position: <code>\"right\"</code> or <code>\"left\"</code> |\n\n#### Examples\n\n```javascript\n// Truncate:\nlimit('Life’s like a box of chocolates.', 20); // \"Life's like a box of\"\n\n// Pad:\nlimit('Everybody loves emojis!', 26, '????'); // \"Everybody loves emojis!????????????\"\nlimit('What are you looking at?', 30, '+', 'left'); // \"++++++What are you looking at?\"\n\n// Unicode Aware:\nlimit('????????????', 2); // \"????????\"\nlimit('????????????????', 4, '????????'); // \"????????????????????????????????\"\n```\n\n### String Length\n\n    function length(str)\n\n| Param | Type                | Default | Description                     |\n| ----- | ------------------- | ------- | ------------------------------- |\n| str   | <code>String</code> | _none_  | String to return the length for |\n\n#### Examples\n\n```javascript\nlength('Iñtërnâtiônàlizætiøn☃????'); // 22\n```\n\n### Substring\n\n    function substring(str, start[, end])\n\n| Param | Type                | Default       | Description          |\n| ----- | ------------------- | ------------- | -------------------- |\n| str   | <code>String</code> | _none_        | String to be devided |\n| start | <code>Number</code> | _none_        | Start position       |\n| end   | <code>Number</code> | End of string | End position         |\n\n#### Examples\n\n```javascript\nsubstring('Emojis ???????? are ???? poison. ????s are bad.', 7, 14); // \"???????? are ????\"\n```\n\n### Substr\n\n    function substr(str[, start[, length]])\n\n| Param  | Type                | Default                               | Description          |\n| ------ | ------------------- | ------------------------------------- | -------------------- |\n| str    | <code>String</code> | _none_                                | String to be devided |\n| start  | <code>Number</code> | Start of string                       | Start position       |\n| length | <code>Number</code> | String length minus `start` parameter | Length of result     |\n\n#### Examples\n\n```javascript\nsubstr('A.C. Milan ????????⚽️', 5, 7); // \"Milan ????????\"\n```\n\n### IndexOf\n\n    function indexOf(str[, searchStr[, position]])\n\n| Param     | Type                | Default | Description           |\n| --------- | ------------------- | ------- | --------------------- |\n| str       | <code>String</code> | _none_  | String to get index   |\n| searchStr | <code>String</code> | _none_  | String to be searched |\n| position  | <code>Number</code> | 0       | Start of searching    |\n\n#### Examples\n\n```javascript\nindexOf('Emojis ???????? are ???? poison. ????s are bad.', 'are'); // 9\nindexOf('Emojis ???????? are ???? poison. ????s are bad.', 'are', 10); // 26\n```\n\n### ToArray\n\n    function toArray(str)\n\n| Param | Type                | Default | Description                |\n| ----- | ------------------- | ------- | -------------------------- |\n| str   | <code>String</code> | _none_  | String to convert to array |\n\n#### Examples\n\n```javascript\ntoArray('????????????????'); // ['????????', '????', '????']\n```\n\n## Test\n\n```bash\n$ npm test\n```\n\n## Benchmark\n\nThis library scores high in a length benchmark (it's intended usage) and should\nbe fast for most use case.\n\n```\nStringz .length (accurate) x 861,039 ops/sec ±1.57% (84 runs sampled)\nLodash .toArray (accurate) x 795,108 ops/sec ±2.13% (82 runs sampled)\nEmoji Aware .split (inaccurate) x 2,269 ops/sec ±1.38% (85 runs sampled)\nSpliddit .length (inaccurate) x 487,718 ops/sec ±2.21% (83 runs sampled)\nUTF8 Length (inaccurate) x 232,918 ops/sec ±1.02% (87 runs sampled)\nFastest is Stringz .length\n```\n\nTo run benchmarks yourself:\n\n```bash\n$ cd ./benchmark\n$ npm install\n$ node run.js\n```\n\n## Changelog\n\n[Moved to CHANGELOG.md](CHANGELOG.md)\n\n## License\n\nThis software is released under the\n[MIT License](http://sallar.mit-license.org/).\n","_attachments":{},"homepage":"https://github.com/sallar/stringz#readme","bugs":{"url":"https://github.com/sallar/stringz/issues"},"license":"MIT"}