Package Exports
- react-number-format
- react-number-format/dist/react-number-format
- react-number-format/dist/react-number-format.cjs.js
- react-number-format/dist/react-number-format.es.js
- react-number-format/dist/react-number-format.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-number-format) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-number-format
React Number format is a input formatter library with a sophisticated and lightweight caret engine.
Features
- Prefix, suffix and thousand separator.
- Custom pattern formatting.
- Masking.
- Custom formatting handler.
- Format number in an input or format as a simple text.
- Fully customizable
Install
Using npm
npm install react-number-format
Using yarn
yarn add react-number-format
ES6
Numeric Format
import { NumericFormat } from 'react-number-format';
Pattern Format
import { PatternFormat } from 'react-number-format';
Read the full documentation here
https://s-yadav.github.io/react-number-format/docs/intro
Migrate from v4 to v5
https://s-yadav.github.io/react-number-format/docs/migration
v4 doc
Development
- Clone the repository or download the zip
npm i -g yarn
to download Yarnyarn
to install dependenciesyarn start
to run example server (http://localhost:8084/)yarn test
to test changesyarn build
to bundle files
Testing
Test cases are written in jasmine and run by karma
Test files : /test/**/*.spec.js
To run test : yarn test