{"_id":"code-point","_rev":"2864517","name":"code-point","description":"Get a UTF-16-encoded code point number of a character","dist-tags":{"latest":"1.1.0","next":"2.0.0-1"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2022-09-14T03:07:00.000Z","created":"2014-10-10T06:58:39.891Z","2.0.0-1":"2018-12-10T23:14:36.529Z","2.0.0-0":"2018-12-06T07:03:44.791Z","1.1.0":"2016-06-02T11:07:22.591Z","1.0.1":"2014-10-10T10:07:06.815Z","1.0.0":"2014-10-10T07:19:59.209Z","0.0.1":"2014-10-10T07:03:33.504Z","0.0.0":"2014-10-10T06:58:39.891Z"},"users":{},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-point.js.git"},"versions":{"2.0.0-1":{"name":"code-point","version":"2.0.0-1","description":"Get a UTF-16-encoded code point number of a character","author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-point.js.git"},"license":"MIT","module":"index.mjs","scripts":{"pretest":"eslint .","test":"nyc tape test.js"},"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^6.8.4","clear-module":"^3.0.0","eslint":"^5.10.0","nyc":"^13.1.0","nyc-config-common":"^1.0.1","rollup":"^0.67.4","rollup-config-module":"^2.0.1","tape":"^4.9.1"},"eslintConfig":{"extends":"@shinnn"},"nyc":{"extends":"nyc-config-common"},"readmeFilename":"README.md","gitHead":"04d4f8ceed75552654aae9237b5f9e81cb045751","bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js#readme","_id":"code-point@2.0.0-1","_npmVersion":"6.5.0","_nodeVersion":"11.3.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"784566920608aa1f379262329115fc5304a4668a","size":2568,"noattachment":false,"key":"/code-point/-/code-point-2.0.0-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-2.0.0-1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/code-point_2.0.0-1_1544483676388_0.8753373146250971"},"_hasShrinkwrap":false,"publish_time":1544483676529,"_cnpm_publish_time":1544483676529,"_cnpmcore_publish_time":"2021-12-19T01:09:50.833Z"},"2.0.0-0":{"name":"code-point","version":"2.0.0-0","description":"Get a UTF-16-encoded code point number of a character","jsnext:main":"index.jsnext.js","scripts":{"pretest":"eslint --fix --format=codeframe --ignore-path .gitignore .","test":"tap --coverage test.js test-es5.js"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-point.js.git"},"license":"MIT","keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^3.3.5","eslint":"^3.12.2","require-from-string":"^1.2.1","rollup":"^0.37.0","tap":"^8.0.1"},"eslintConfig":{"extends":"@shinnn"},"readmeFilename":"README.md","gitHead":"4da22ef37b62d1a1f9cd0b80e07a560bebc786da","bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js#readme","_id":"code-point@2.0.0-0","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"f6fc096b4775db298603561ba3ef003d0d25dba7","size":2526,"noattachment":false,"key":"/code-point/-/code-point-2.0.0-0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-2.0.0-0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/code-point_2.0.0-0_1544079824451_0.24145732215439208"},"_hasShrinkwrap":false,"publish_time":1544079824791,"_cnpm_publish_time":1544079824791,"_cnpmcore_publish_time":"2021-12-19T01:09:51.044Z"},"1.1.0":{"name":"code-point","version":"1.1.0","description":"Get a UTF-16-encoded code point number of a character","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js","LICENSES.md"],"scripts":{"pretest":"eslint --fix --config @shinnn --ignore-path .gitignore .","test":"tap --node-arg=--strong_mode --coverage test.js test-es5.js"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/code-point.js.git"},"license":"MIT","keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.3.0","eslint":"^2.11.1","require-from-string":"^1.2.0","rollup":"^0.26.3","tap":"^5.7.2"},"gitHead":"0f961339541b88846003c66f9b0c1d88e8f66ec9","bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js#readme","_id":"code-point@1.1.0","_shasum":"999841f51f54ccae4a0dabbc869063234603fecd","_from":".","_npmVersion":"3.9.2","_nodeVersion":"5.9.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"999841f51f54ccae4a0dabbc869063234603fecd","size":2642,"noattachment":false,"key":"/code-point/-/code-point-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-1.1.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/code-point-1.1.0.tgz_1464865642155_0.908896611770615"},"directories":{},"publish_time":1464865642591,"_hasShrinkwrap":false,"_cnpm_publish_time":1464865642591,"_cnpmcore_publish_time":"2021-12-19T01:09:51.231Z"},"1.0.1":{"name":"code-point","version":"1.0.1","description":"Get a UTF-16-encoded code point number of a character","main":"./dist/code-point-cjs.js","files":["dist/code-point-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-point.js.git"},"bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-point.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"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","require-uncached":"^1.0.2","rimraf":"^2.2.8","string.prototype.codepointat":"^0.2.0","tape":"^3.0.0","to-camel-case":"^0.2.1"},"gitHead":"edeae05438eb0445bd143f9a5bc05938f26d637a","_id":"code-point@1.0.1","_shasum":"da8ebe5bcd88863aaefa8167572a2afafcebf165","_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":"da8ebe5bcd88863aaefa8167572a2afafcebf165","size":2194,"noattachment":false,"key":"/code-point/-/code-point-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-1.0.1.tgz"},"directories":{},"publish_time":1412935626815,"_hasShrinkwrap":false,"_cnpm_publish_time":1412935626815,"_cnpmcore_publish_time":"2021-12-19T01:09:51.467Z"},"1.0.0":{"name":"code-point","version":"1.0.0","description":"Get a UTF-16-encoded code point number of a character","main":"./dist/code-point-cjs.js","files":["dist/code-point-cjs.js","LICENSE"],"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-point.js.git"},"bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-point.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"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","require-uncached":"^1.0.2","rimraf":"^2.2.8","string.prototype.codepointat":"^0.2.0","tape":"^3.0.0","to-camel-case":"^0.2.1"},"gitHead":"bcfd9fff55cb5805b64c7c300bb715a9543ba0c3","_id":"code-point@1.0.0","_shasum":"53dd36c009ee49a534616c812c53df9d9bd206d6","_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":"53dd36c009ee49a534616c812c53df9d9bd206d6","size":2136,"noattachment":false,"key":"/code-point/-/code-point-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-1.0.0.tgz"},"directories":{},"publish_time":1412925599209,"_hasShrinkwrap":false,"_cnpm_publish_time":1412925599209,"_cnpmcore_publish_time":"2021-12-19T01:09:51.667Z"},"0.0.1":{"name":"code-point","version":"0.0.1","description":"Get a UTF-16-encoded code point number of a character","main":"./dist/code-point-cjs.js","files":["dist/code-point-cjs.js","LICENSE"],"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-point.js.git"},"bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-point.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"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","require-uncached":"^1.0.2","rimraf":"^2.2.8","string.prototype.codepointat":"^0.2.0","tape":"^3.0.0","to-camel-case":"^0.2.1"},"gitHead":"e7438d3c11ee27ec8cd5ebf5717ea6083f8ab1ae","_id":"code-point@0.0.1","_shasum":"25f5e73f763f6ffa3c908e4b6e5f1596225766d0","_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":"25f5e73f763f6ffa3c908e4b6e5f1596225766d0","size":2138,"noattachment":false,"key":"/code-point/-/code-point-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-0.0.1.tgz"},"directories":{},"publish_time":1412924613504,"_hasShrinkwrap":false,"_cnpm_publish_time":1412924613504,"_cnpmcore_publish_time":"2021-12-19T01:09:51.866Z"},"0.0.0":{"name":"code-point","version":"0.0.0","description":"Get a UTF-16-encoded code point number of a character","main":"./dist/code-point-cjs.js","bin":{"code-point":"./cli.js"},"files":["cli.js","dist/code-point-cjs.js","LICENSE"],"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-point.js.git"},"bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"homepage":"https://github.com/shinnn/code-point.js","licenses":[{"type":"MIT","url":"https://github.com/shinnn/code-point.js/blob/master/LICENSE"}],"keywords":["code","point","code-point","string","char","character","unicode","utf16","utf-16","codepointat","surrogate","plane","browser","client-side"],"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","require-uncached":"^1.0.2","rimraf":"^2.2.8","string.prototype.codepointat":"^0.2.0","tape":"^3.0.0","to-camel-case":"^0.2.1"},"gitHead":"795aacfc884da8315b57b2d129add38b871e1bc4","_id":"code-point@0.0.0","_shasum":"a4f351bd5787ab2a5e463c6b9294d19f85d4e19d","_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":"a4f351bd5787ab2a5e463c6b9294d19f85d4e19d","size":2144,"noattachment":false,"key":"/code-point/-/code-point-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/code-point/download/code-point-0.0.0.tgz"},"directories":{},"publish_time":1412924319891,"_hasShrinkwrap":false,"_cnpm_publish_time":1412924319891,"_cnpmcore_publish_time":"2021-12-19T01:09:52.126Z"}},"readme":"# code-point.js\n\n[![NPM version](https://img.shields.io/npm/v/code-point.svg)](https://www.npmjs.com/package/code-point)\n[![Bower version](https://img.shields.io/bower/v/code-point.svg)](https://github.com/shinnn/code-point.js/releases)\n[![Build Status](https://travis-ci.org/shinnn/code-point.js.svg?branch=master)](https://travis-ci.org/shinnn/code-point.js)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/code-point.js.svg)](https://coveralls.io/r/shinnn/code-point.js)\n[![devDependency Status](https://david-dm.org/shinnn/code-point.js/dev-status.svg)](https://david-dm.org/shinnn/code-point.js#info=devDependencies)\n\nGet a [UTF-16](https://wikipedia.org/wiki/UTF-16)-encoded code point number of a character\n\n```javascript\n'A'.charCodeAt(0); //=> 65\ncodePoint('A'); //=> 65\n\n'????'.charCodeAt(0); //=> 55422\ncodePoint('????'); //=> 195060\n```\n\n## Installation\n\n### Package managers\n\n#### [npm](https://www.npmjs.com/)\n\n```\nnpm install code-point\n```\n\n#### [Bower](http://bower.io/)\n\n```\nbower install code-point\n```\n\n### Standalone\n\n[Download the script file directly.](https://raw.githubusercontent.com/shinnn/code-point.js/master/browser.js)\n\n## API\n\n### codePoint(*character*)\n\n*character*: `String`  \nReturn: `Number`\n\nIf it takes a string as an argument, it returns the same result of `character.codePointAt(0)`.\n\nIt throws an error if the argument is not a string or the string is empty.\n\n```javascript\ncodePoint('\\udada'); //=> 56026\ncodePoint('\\udada\\udfdf'); //=> 814047\n```\n\nIt works correctly even in ECMAScript <= 5 environments that don't support  [`String.prototype.codePointAt`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt).\n\n## Credit\n\nThis module includes the code of [mathiasbynens](https://github.com/mathiasbynens) / [String.prototype.codePointAt](https://github.com/mathiasbynens/String.prototype.codePointAt). Thanks, [Mathias Bynens][mathias].\n\n## Licenses\n\n### [String.prototype.codePointAt](https://github.com/mathiasbynens/String.prototype.codePointAt#license)\n\nAuthor: [Mathias Bynens][mathias]\n\n> This polyfill is available under the [MIT](https://opensource.org/licenses/mit-license) license.\n\n### code-point.js\n\nCopyright (c) 2014 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](https://github.com/shinnn/code-point/blob/master/LICENSES.md#code-pointjs).\n\n[mathias]: https://mathiasbynens.be/\n","_attachments":{},"homepage":"https://github.com/shinnn/code-point.js#readme","bugs":{"url":"https://github.com/shinnn/code-point.js/issues"},"license":"MIT"}