
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ctm-react-text-mask
Advanced tools
First, install it.
npm i react-text-mask --save
Then, require it and use it.
var React = require('react')
var MaskedInput = require('react-text-mask')
var MyComponent = React.createClass({
render() {
return (
<div>
<MaskedInput mask={['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]} />
</div>
)
}
})
<MaskedInput/>
is fully compatible with <input/>
element. So, you can
pass to it CSS classes, a placeholder attribute, or whatever.
For example, the following works:
<MaskedTextInput
mask={['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]}
className="form-control"
placeholder="Enter a phone number"
guide={false}
id="my-input-id"
/>
For more information about the props
that you can pass to the component, see
the documentation here.
To see an example of the code running, follow these steps:
git clone git@github.com:text-mask/text-mask.git
cd text-mask
npm install
npm run react:dev
The code of the example is in react/example
.
We would love some contributions! Check out this document to get started.
FAQs
React input component that accepts mask pattern
The npm package ctm-react-text-mask receives a total of 0 weekly downloads. As such, ctm-react-text-mask popularity was classified as not popular.
We found that ctm-react-text-mask demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.