Skip to content

Hkmu/int-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

int-parser

Install

npm i int-parser --save

API

parseInt(num: Number, symbols: String | Array)

const parser = require('int-parser');
const base62Symbols = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

parser.parseInt(99999, base62Symbols); // => 'q0T'

toInt(str: String, symbols: String | Array)

const parser = require('int-paser');
const base62Symbols = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

parser.toInt('q0T', base62Symbols); // 99999

About

Integer parser with custom symbols.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published