react-maskfy
Advanced tools
Comparing version 0.0.1 to 2.0.0
{ | ||
"name": "react-maskfy", | ||
"version": "0.0.1", | ||
"description": "A React library without a dependency... Very simple to install and use. With only 2kb (gzip) code, it's also well accepted on mobile devices", | ||
"version": "2.0.0", | ||
"description": "A React library without a dependency... Very simple to install and use. With only 1kb (gzip) code, IE Compatibility, it's also well accepted on mobile devices", | ||
"main": "maskfy.js", | ||
@@ -27,3 +27,3 @@ "scripts": { | ||
}, | ||
"homepage": "https://github.com/figuarnieri/maskfy#readme" | ||
"homepage": "https://figuarnieri.github.io/maskfy/" | ||
} |
@@ -1,18 +0,20 @@ | ||
# Maskfy - Input Mask Simple | ||
A React library without a dependency... Very simple to install and use. With only 2kb (gzip) code, it's also well accepted on mobile devices | ||
## Install | ||
Install Maskfy | ||
```jsx | ||
# Maskfy (2.0.0) - Input Mask Simple | ||
A React library without a dependency... Very simple to install and use. With only 1kb (gzip) code, IE Compatibility, it's also well accepted on mobile devices | ||
## Install / Usage | ||
Install npm Maskfy | ||
```node | ||
npm i react-maskfy | ||
``` | ||
## Usage | ||
### Import Component | ||
```javascript | ||
import Maskfy from './../../Components/Maskfy'; | ||
... | ||
import Maskfy from 'react-maskfy'; | ||
``` | ||
### Usage Component | ||
```javascript | ||
<Maskfy mask={'(99) 9999-99999'}> | ||
<input id="Phone" name="Phone" /> | ||
</Maskfy> | ||
``` | ||
or | ||
```javascript | ||
<Maskfy mask={'(99) 9999-99999'}> | ||
@@ -24,9 +26,23 @@ <TextField id="Phone" label="Phone" /> | ||
```javascript | ||
<Maskfy mask={'999.999,99'} reverse={true} size={3}> | ||
<Maskfy mask={'999.999.999,99'} reverse={true} minSize={3} defaultValue={'123'} letters={false} after={handleEvent}> | ||
<input id="Money" name="Money" /> | ||
</Maskfy> | ||
``` | ||
### mask | ||
{String: undefined} **__(required)__ selector input** | ||
### reverse | ||
{Boolean: false} **reverse typing** | ||
### minSize | ||
{Number: undefined} **minimum digits** | ||
### defaultValue | ||
{String: undefined} **initial value** | ||
### letters | ||
{Boolean: false} **allowed letters** | ||
### after | ||
{Function: undefined} **after input event** | ||
## Source | ||
[Github](https://github.com/figuarnieri/maskfy) | [Vanilla npm](https://www.npmjs.com/package/maskfy) | [Example](https://figuarnieri.github.io/maskfy/) | [@figuarnieri](https://twitter.com/figuarnieri) | ||
## License | ||
The MIT License | ||
Copyright 2017 © [Filipe Guarnieri](https://figuarnieri.github.io/) | ||
Copyright 2018 © [Filipe Guarnieri](https://figuarnieri.github.io/) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
36558
7
279
1
47
1