Skip to content

Latest commit

 

History

History

numbers

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

npm size

@jsep-plugin/numbers

A JSEP plugin for adding support for additional number formats, hexadecimal, binary and octal. It also adds support to ignore _ characters in numbers

jsep('0xA'); // hexadecimal (10)  
jsep('0b01001010'); // binary (74)
jsep('0644'); // octal (420)
jsep('0o644'); // octal (420)
jsep('115_200'); // decimal (115200)

Install

npm install @jsep-plugin/numbers
# or
yarn add @jsep-plugin/numbers

Usage

import jsep from 'jsep';
import jsepNumbers from '@jsep-plugin/numbers';
jsep.plugins.register(jsepNumbers);

Meta

LICENSE (MIT)