Skip to content
/ ordr Public

Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. ES6 implementation of Python built-in ord() function

License

Notifications You must be signed in to change notification settings

nhsz/ordr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ordr

NPM

Given a string representing one Unicode character, return an integer representing the Unicode code point of that character.
ES6 implementation of Python built-in ord() function

This is the inverse of char.

Install

$ npm install --save ordr

Usage

const ord = require('ordr')

console.log(ord('A'))
// => 65

console.log(ord('a'))
// => 97

console.log(ord('€'))
// => 8364

console.log(ord('@'))
// => 64

License

MIT © Nicolás Quiroz

About

Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. ES6 implementation of Python built-in ord() function

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published