Gathering detailed insights and metrics for @jablonski/react-imask
Gathering detailed insights and metrics for @jablonski/react-imask
Gathering detailed insights and metrics for @jablonski/react-imask
Gathering detailed insights and metrics for @jablonski/react-imask
npm install @jablonski/react-imask
Typescript
Module System
Node Version
NPM Version
70.8
Supply Chain
97.3
Quality
74.7
Maintenance
100
Vulnerability
100
License
TypeScript (93.31%)
JavaScript (3.67%)
HTML (2.96%)
Ruby (0.05%)
Total Downloads
333
Last Day
2
Last Week
3
Last Month
7
Last Year
84
5,011 Stars
956 Commits
262 Forks
30 Watching
9 Branches
29 Contributors
Minified
Minified + Gzipped
Latest Version
6.5.0
Package Id
@jablonski/react-imask@6.5.0
Unpacked Size
93.14 kB
Size
16.46 kB
File Count
20
NPM Version
8.19.2
Node Version
18.12.0
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
50%
3
Compared to previous week
Last month
133.3%
7
Compared to previous month
Last year
-35.4%
84
Compared to previous year
2
1
4
react-imask
npm install react-imask
1import { useRef } from 'react'; 2import { IMaskInput } from 'react-imask'; 3 4// use ref to get access to internal "masked = ref.current.maskRef" 5const ref = useRef(null); 6const inputRef = useRef(null); 7<IMaskInput 8 mask={Number} 9 radix="." 10 value="123" 11 unmask={true} // true|false|'typed' 12 ref={ref} 13 inputRef={inputRef} // access to nested input 14 // DO NOT USE onChange TO HANDLE CHANGES! 15 // USE onAccept INSTEAD 16 onAccept={ 17 // depending on prop above first argument is 18 // `value` if `unmask=false`, 19 // `unmaskedValue` if `unmask=true`, 20 // `typedValue` if `unmask='typed'` 21 (value, mask) => console.log(value) 22 } 23 // ...and more mask props in a guide 24 25 // input props also available 26 placeholder='Enter number here' 27/>
1import { IMaskMixin } from 'react-imask'; 2 3// extend style component 4const StyledInput = styled.input` 5 color: green; 6`; 7 8const MaskedStyledInput = IMaskMixin(({inputRef, ...props}) => ( 9 <StyledInput 10 {...props} 11 innerRef={inputRef} // bind internal input (if you use styled-components V4, use "ref" instead "innerRef") 12 /> 13)); 14 15<MaskedStyledInput 16 mask={Number} 17 radix="." 18 onAccept={(value, mask) => console.log(value)} 19 // ...and more mask props in a guide 20 21 // ...other styled props 22/>
More options see in a guide.
1import { useState } from 'react'; 2import { useIMask } from 'react-imask'; 3 4function IMaskWithHook () { 5 const [ opts, setOpts ] = useState({ mask: Number }); 6 const { 7 ref, 8 maskRef, 9 value, 10 setValue, 11 unmaskedValue, 12 setUnmaskedValue, 13 typedValue, 14 setTypedValue, 15 } = useIMask(opts, /* { onAccept, onComplete } */); 16 17 return ( 18 <input ref={ref} /> 19 ); 20}
No vulnerabilities found.
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
31 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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 More