char
Return the string representing a character whose Unicode code point is the integer
code
.
ES6 implementation ofPython built-in chr()
function
This is the inverse of ordr
.
The valid range for the argument is from 0 through 1114111 (0x10FFFF in base 16). RangeError will be raised if code
is outside that range.
Install
$ npm install char
Usage
const chr = console// => 'A' console// => 'a' console// => '€' console// => '@' console// => RangeError: Invalid code point -1
License
MIT © Nicolás Quiroz