React component to format numbers in an input or as a text.
Installations
npm install react-number-format
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
20.3.1
NPM Version
9.6.7
Score
90.8
Supply Chain
90
Quality
80.3
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
JavaScript (52.11%)
TypeScript (47.41%)
HTML (0.31%)
CSS (0.17%)
Developer
s-yadav
Download Statistics
Total Downloads
188,408,736
Last Day
130,909
Last Week
1,204,783
Last Month
6,189,881
Last Year
65,354,156
GitHub Statistics
3,917 Stars
578 Commits
416 Forks
19 Watching
48 Branches
70 Contributors
Package Meta Information
Latest Version
5.4.2
Package Id
react-number-format@5.4.2
Unpacked Size
234.13 kB
Size
55.96 kB
File Count
13
NPM Version
9.6.7
Node Version
20.3.1
Publised On
07 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
188,408,736
Last day
-56.2%
130,909
Compared to previous day
Last week
-21.4%
1,204,783
Compared to previous week
Last month
4.6%
6,189,881
Compared to previous month
Last year
46.2%
65,354,156
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
54
react-number-format
React Number Format is an input-formatter library with a sophisticated and light weight caret engine. It ensures that a user can only enter text that meets specific numeric or string patterns, and formats the input value for display.
Features
- Prefix, suffix and thousands separator.
- Input Masking.
- Format number in an input or format as a simple text.
- Custom pattern formatting.
- Custom formatting handler.
- Fully customizable
Demos
See the many DEMO sections in the documentation.
Install
Using npm
npm install react-number-format
Using yarn
yarn add react-number-format
Documentation
Read the full documentation here https://s-yadav.github.io/react-number-format/docs/intro
ES6
Numeric Format
1import { NumericFormat } from 'react-number-format';
NumericFormat Props: https://s-yadav.github.io/react-number-format/docs/numeric_format
Pattern Format
1import { PatternFormat } from 'react-number-format';
PatternFormat Props: https://s-yadav.github.io/react-number-format/docs/pattern_format
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
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'allow deletion' disabled on branch 'master'
- Info: 'force pushes' disabled on branch 'master'
- Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'
- Warn: required approving review count is 1 on branch 'master'
- Warn: codeowners review is required - but no codeowners file found in repo
- Info: status check found to merge onto on branch 'master'
- Info: PRs are required in order to make changes on branch 'master'
Reason
Found 4/14 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/CD.yml:1
- Warn: no topLevel permission defined: .github/workflows/CI.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CD.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/s-yadav/react-number-format/CD.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CD.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/s-yadav/react-number-format/CD.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/s-yadav/react-number-format/CI.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/s-yadav/react-number-format/CI.yml/master?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 21 are checked with a SAST tool
Reason
49 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-mf6x-hrgr-658f
- Warn: Project is vulnerable to: GHSA-xrh7-m5pp-39r6
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-8jhw-289h-jh2g
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986 / GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
- Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3.4
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-number-format
@react-input/number-format
React input component for formatted number input with locale-specific.
react-currency-format
React component to format currency in an input or as a text.
react-phone-input-2
A react component to format phone numbers
react-format-number
A React Component of formatted number input