Given a string representing one Unicode character, return an integer representing the Unicode code point of that character.
ES6 implementation ofPython built-in ord()
function
This is the inverse of char
.
$ npm install --save ordr
const ord = require('ordr')
console.log(ord('A'))
// => 65
console.log(ord('a'))
// => 97
console.log(ord('€'))
// => 8364
console.log(ord('@'))
// => 64
MIT © Nicolás Quiroz