str2int
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

str2int

Encode string to int

use for select somthing random with string

Usage

var str2int = require('str2int');

str2int('a'); // => 97
str2int('A'); // => 65
str2int('Hello World'); // => 1052
str2int('World Hello'); // => 1052
str2int(''); // => 0
str2int('你好中国'); // => 85511

/str2int/

    Package Sidebar

    Install

    npm i str2int

    Weekly Downloads

    199

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    1.16 kB

    Total Files

    4

    Last publish

    Collaborators

    • moonrailgun