{"_id":"code-points","_rev":"2864481","name":"code-points","description":"Get the code points of each character in the string","dist-tags":{"latest":"2.0.0-1"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2022-09-14T03:06:56.000Z","created":"2014-10-15T03:29:38.224Z","2.0.0-1":"2019-04-05T07:38:42.747Z","2.0.0-0":"2019-04-05T07:23:51.580Z","1.1.3":"2015-06-01T13:09:32.113Z","1.1.2":"2015-02-26T08:09:29.471Z","1.1.1":"2014-11-12T01:49:30.339Z","1.1.0":"2014-10-16T01:48:20.035Z","1.0.0":"2014-10-15T03:29:38.224Z"},"users":{},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-points.js.git"},"versions":{"2.0.0-1":{"name":"code-points","version":"2.0.0-1","description":"Get the code points of each character in the string","main":"dist/code-points-cjs.js","scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-points.js.git"},"license":"MIT","keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane"],"dependencies":{"code-point":"^1.0.1"},"devDependencies":{"gulp":"^3.8.11","gulp-footer":"^1.0.5","gulp-header":"^1.2.2","gulp-jscs":"^1.6.0","gulp-jshint":"^1.11.0","gulp-jsonlint":"^1.0.1","gulp-load-plugins":"^0.10.0","gulp-rename":"^1.2.2","gulp-replace":"^0.5.3","istanbul":"^0.3.14","istanbul-coveralls":"^1.0.2","jshint-stylish":"^2.0.0","merge-stream":"^0.1.7","rimraf":"^2.3.4","tape":"^4.0.0","tiny-npm-license":"^1.0.0","to-camel-case":"^0.2.1"},"jscsConfig":{"preset":"google","maximumLineLength":98,"requireBlocksOnNewline":true,"validateLineBreaks":"LF"},"gitHead":"4097ccac02bf426665245efa3030c900110d8ca6","bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js#readme","_id":"code-points@2.0.0-1","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"01c23bda70cf45ef5772590c3ab8ba4f8774f58a","size":2396,"noattachment":false,"key":"/code-points/-/code-points-2.0.0-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-2.0.0-1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/code-points_2.0.0-1_1554449922473_0.8307312578905905"},"_hasShrinkwrap":false,"publish_time":1554449922747,"_cnpm_publish_time":1554449922747,"_cnpmcore_publish_time":"2021-12-19T01:09:24.101Z"},"2.0.0-0":{"name":"code-points","version":"2.0.0-0","description":"Get the code points of each character in the string","main":"dist/code-points-cjs.js","bin":{"code-points":"cli.js"},"scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-points.js.git"},"license":"MIT","keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"dependencies":{"chalk":"^1.0.0","code-point":"^1.0.1","get-stdin":"^4.0.1","minimist":"^1.1.1","sum-up":"^1.0.1"},"devDependencies":{"gulp":"^3.8.11","gulp-footer":"^1.0.5","gulp-header":"^1.2.2","gulp-jscs":"^1.6.0","gulp-jshint":"^1.11.0","gulp-jsonlint":"^1.0.1","gulp-load-plugins":"^0.10.0","gulp-rename":"^1.2.2","gulp-replace":"^0.5.3","istanbul":"^0.3.14","istanbul-coveralls":"^1.0.2","jshint-stylish":"^2.0.0","merge-stream":"^0.1.7","rimraf":"^2.3.4","tape":"^4.0.0","tiny-npm-license":"^1.0.0","to-camel-case":"^0.2.1"},"jscsConfig":{"preset":"google","maximumLineLength":98,"requireBlocksOnNewline":true,"validateLineBreaks":"LF"},"gitHead":"a160cecfc7f20afdbd14ba0cb7e02c4081b4deea","bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js#readme","_id":"code-points@2.0.0-0","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"7135dbb52662786096c7e49efd5100860e25ce9b","size":3264,"noattachment":false,"key":"/code-points/-/code-points-2.0.0-0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-2.0.0-0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/code-points_2.0.0-0_1554449031480_0.46405651956716065"},"_hasShrinkwrap":false,"publish_time":1554449031580,"_cnpm_publish_time":1554449031580,"_cnpmcore_publish_time":"2021-12-19T01:09:24.347Z"},"1.1.3":{"name":"code-points","version":"1.1.3","description":"Get the code points of each character in the string","main":"dist/code-points-cjs.js","bin":{"code-points":"cli.js"},"files":["cli.js","dist/code-points-cjs.js"],"scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-points.js.git"},"license":"MIT","keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"dependencies":{"chalk":"^1.0.0","code-point":"^1.0.1","get-stdin":"^4.0.1","minimist":"^1.1.1","sum-up":"^1.0.1"},"devDependencies":{"gulp":"^3.8.11","gulp-footer":"^1.0.5","gulp-header":"^1.2.2","gulp-jscs":"^1.6.0","gulp-jshint":"^1.11.0","gulp-jsonlint":"^1.0.1","gulp-load-plugins":"^0.10.0","gulp-rename":"^1.2.2","gulp-replace":"^0.5.3","istanbul":"^0.3.14","istanbul-coveralls":"^1.0.2","jshint-stylish":"^2.0.0","merge-stream":"^0.1.7","rimraf":"^2.3.4","tape":"^4.0.0","tiny-npm-license":"^1.0.0","to-camel-case":"^0.2.1"},"jscsConfig":{"preset":"google","maximumLineLength":98,"requireBlocksOnNewline":true,"validateLineBreaks":"LF"},"gitHead":"ce18d1ce3f756a22db43d3e976574f7502b60d04","bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js#readme","_id":"code-points@1.1.3","_shasum":"9f12e03000f1a516199d8c6ee8790faa24abeecd","_from":".","_npmVersion":"2.10.1","_nodeVersion":"2.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"9f12e03000f1a516199d8c6ee8790faa24abeecd","size":3595,"noattachment":false,"key":"/code-points/-/code-points-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-1.1.3.tgz"},"directories":{},"publish_time":1433164172113,"_hasShrinkwrap":false,"_cnpm_publish_time":1433164172113,"_cnpmcore_publish_time":"2021-12-19T01:09:24.577Z"},"1.1.2":{"name":"code-points","version":"1.1.2","description":"Get the code points of each character in the string","main":"dist/code-points-cjs.js","bin":{"code-points":"cli.js"},"files":["cli.js","dist/code-points-cjs.js"],"scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","email":"snnskwtnb@gmail.com","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"https://github.com/shinnn/code-points.js"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-points.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"dependencies":{"chalk":"^1.0.0","code-point":"^1.0.1","get-stdin":"^4.0.1","minimist":"^1.1.0","sum-up":"^1.0.1"},"devDependencies":{"gulp":"^3.8.11","gulp-footer":"^1.0.5","gulp-header":"^1.2.2","gulp-jscs":"^1.4.0","gulp-jshint":"^1.9.2","gulp-jsonlint":"^1.0.1","gulp-load-plugins":"^0.8.0","gulp-rename":"^1.2.0","gulp-replace":"^0.5.3","istanbul":"^0.3.6","istanbul-coveralls":"^1.0.1","jshint-stylish":"^1.0.1","merge-stream":"^0.1.7","rimraf":"^2.2.8","tape":"^3.5.0","tiny-npm-license":"^1.0.0","to-camel-case":"^0.2.1"},"jscsConfig":{"preset":"google","maximumLineLength":98,"requireBlocksOnNewline":true,"validateLineBreaks":"LF"},"gitHead":"2b20b067e29627be9605a26049f9a5f5228b2e58","bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js","_id":"code-points@1.1.2","_shasum":"613a8a3af147afbbddfc934eab7b64f2e6a74c0e","_from":".","_npmVersion":"2.6.0","_nodeVersion":"1.3.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"613a8a3af147afbbddfc934eab7b64f2e6a74c0e","size":3637,"noattachment":false,"key":"/code-points/-/code-points-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-1.1.2.tgz"},"directories":{},"publish_time":1424938169471,"_hasShrinkwrap":false,"_cnpm_publish_time":1424938169471,"_cnpmcore_publish_time":"2021-12-19T01:09:24.770Z"},"1.1.1":{"name":"code-points","version":"1.1.1","description":"Get the code points of each character in the string","main":"./dist/code-points-cjs.js","bin":{"code-points":"cli.js"},"files":["cli.js","dist/code-points-cjs.js","LICENSE.md"],"scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","email":"snnskwtnb@gmail.com","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"https://github.com/shinnn/code-points.js.git"},"bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-points.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"dependencies":{"chalk":"^0.5.1","code-point":"^1.0.1","get-stdin":"^3.0.0","minimist":"^1.1.0"},"devDependencies":{"gulp":"^3.8.10","gulp-footer":"^1.0.5","gulp-header":"^1.2.2","gulp-jscs":"^1.3.0","gulp-jshint":"^1.9.0","gulp-jsonlint":"^1.0.1","gulp-load-plugins":"^0.7.1","gulp-rename":"^1.2.0","gulp-replace":"^0.5.0","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.1","jshint-stylish":"^1.0.0","merge-stream":"^0.1.6","rimraf":"^2.2.8","tape":"^3.0.2","tiny-npm-license":"^1.0.0","to-camel-case":"^0.2.1"},"gitHead":"4747ff961297c6fe88df38315e010c25866e31c8","_id":"code-points@1.1.1","_shasum":"6d291ac3104d41de0aa806606d01a981cc263131","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.33","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"6d291ac3104d41de0aa806606d01a981cc263131","size":3546,"noattachment":false,"key":"/code-points/-/code-points-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-1.1.1.tgz"},"directories":{},"publish_time":1415756970339,"_hasShrinkwrap":false,"_cnpm_publish_time":1415756970339,"_cnpmcore_publish_time":"2021-12-19T01:09:25.025Z"},"1.1.0":{"name":"code-points","version":"1.1.0","description":"Get the code points of each character in the string","main":"./dist/code-points-cjs.js","bin":{"code-points":"cli.js"},"files":["cli.js","dist/code-points-cjs.js","LICENSE.md"],"scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","email":"snnskwtnb@gmail.com","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"https://github.com/shinnn/code-points.js.git"},"bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-points.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"dependencies":{"chalk":"^0.5.1","code-point":"^1.0.1","get-stdin":"^3.0.0","minimist":"^1.1.0"},"devDependencies":{"gulp":"^3.8.8","gulp-footer":"^1.0.5","gulp-header":"^1.1.1","gulp-jscs":"^1.1.2","gulp-jshint":"^1.8.5","gulp-jsonlint":"^0.1.0","gulp-load-plugins":"^0.7.0","gulp-rename":"^1.2.0","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.1","jshint-stylish":"^1.0.0","merge-stream":"^0.1.6","rimraf":"^2.2.8","tape":"^3.0.0","to-camel-case":"^0.2.1"},"gitHead":"86040faaf04ec130a24381fd814964df72642d1a","_id":"code-points@1.1.0","_shasum":"90445c1f0179dbb72b663741021bcd96f6886326","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.32","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"90445c1f0179dbb72b663741021bcd96f6886326","size":2839,"noattachment":false,"key":"/code-points/-/code-points-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-1.1.0.tgz"},"directories":{},"publish_time":1413424100035,"_hasShrinkwrap":false,"_cnpm_publish_time":1413424100035,"_cnpmcore_publish_time":"2021-12-19T01:09:25.297Z"},"1.0.0":{"name":"code-points","version":"1.0.0","description":"Get the code points of each character in the string","main":"./dist/code-points-cjs.js","bin":{"code-points":"cli.js"},"files":["cli.js","dist/code-points-cjs.js","LICENSE.md"],"scripts":{"test":"gulp test","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"author":{"name":"Shinnosuke Watanabe","email":"snnskwtnb@gmail.com","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"https://github.com/shinnn/code-points.js.git"},"bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"homepage":"https://github.com/shinnn/code-points.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-points.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"dependencies":{"chalk":"^0.5.1","code-point":"^1.0.1","get-stdin":"^3.0.0","minimist":"^1.1.0"},"devDependencies":{"gulp":"^3.8.8","gulp-footer":"^1.0.5","gulp-header":"^1.1.1","gulp-jscs":"^1.1.2","gulp-jshint":"^1.8.5","gulp-jsonlint":"^0.1.0","gulp-load-plugins":"^0.7.0","gulp-rename":"^1.2.0","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.1","jshint-stylish":"^1.0.0","merge-stream":"^0.1.6","rimraf":"^2.2.8","tape":"^3.0.0","to-camel-case":"^0.2.1"},"gitHead":"ce0f86f969bd5520a620e5090d137fdd34d7f7c7","_id":"code-points@1.0.0","_shasum":"a9670b330fbdc5b19e87246a9bbdbb759820abee","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.32","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"a9670b330fbdc5b19e87246a9bbdbb759820abee","size":2638,"noattachment":false,"key":"/code-points/-/code-points-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-points/download/code-points-1.0.0.tgz"},"directories":{},"publish_time":1413343778224,"_hasShrinkwrap":false,"_cnpm_publish_time":1413343778224,"_cnpmcore_publish_time":"2021-12-19T01:09:25.525Z"}},"readme":"# code-points\n\n[![npm version](https://img.shields.io/npm/v/code-points.svg)](https://www.npmjs.com/package/code-points)\n[![Build Status](https://travis-ci.com/shinnn/code-points.js.svg?branch=master)](https://travis-ci.com/shinnn/code-points.js)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/code-points.js.svg)](https://coveralls.io/github/shinnn/code-points.js)\n\nGet the [UTF-16](https://wikipedia.org/wiki/UTF-16)-encoded code points of each character in the string\n\n```javascript\ncodePoints('Hello, 世界\\n'); //=> [72, 101, 108, 108, 111, 44, 32, 19990, 30028]\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install code-points\n```\n\n## API\n\n### codePoints(*str*, *option*)\n\n*str*: `string`  \n*option*: `Object`  \nReturn: `Array<integer>`\n\nIt returns the [code point](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)s of each character in the string as an array.\n\n```javascript\ncodePoints('\\udada'); //=> [56026]\ncodePoints('\\udfdf\\udada\\udada'); //=> [57311, 56026, 56026]\ncodePoints('\\udada\\udfdf\\udada'); //=> [814047, 56026]\n```\n\n#### option.unique\n\nType: `boolean`  \nDefault: `false`\n\nRemoves duplicates from result.\n\n```javascript\ncodePoints('banana'); //=> [98, 97, 110, 97, 110, 97]\ncodePoints('banana', {unique: true}); //=> [98,97,110]\n```\n\n## License\n\nCopyright (c) 2014 - 2019 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](https://github.com/shinnn/code-points/blob/master/LICENSE).\n","_attachments":{},"homepage":"https://github.com/shinnn/code-points.js#readme","bugs":{"url":"https://github.com/shinnn/code-points.js/issues"},"license":"MIT"}