Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-maskedinput

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-maskedinput - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

CHANGES.md

@@ -0,1 +1,8 @@

## 1.1.0 / 2015-03-26
Updated to [inputmaask-core@1.2.0](https://github.com/insin/inputmask-core/blob/master/CHANGES.md#120--2015-03-26)
A `formatCharacters` prop can now be passed to configure input mask format
characters.
## 1.0.0 / 2015-03-25

@@ -2,0 +9,0 @@

9

lib/index.js

@@ -10,3 +10,5 @@ 'use strict';

propTypes: {
pattern: React.PropTypes.string.isRequired
pattern: React.PropTypes.string.isRequired,
formatCharacters: React.PropTypes.object
},

@@ -23,3 +25,4 @@

pattern: this.props.pattern,
value: this.props.value
value: this.props.value,
formatCharacters: this.props.formatCharacters
})

@@ -111,3 +114,3 @@ },

render:function() {
var $__0= this.props,pattern=$__0.pattern,size=$__0.size,placeholder=$__0.placeholder,props=(function(source, exclusion) {var rest = {};var hasOwn = Object.prototype.hasOwnProperty;if (source == null) {throw new TypeError();}for (var key in source) {if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {rest[key] = source[key];}}return rest;})($__0,{pattern:1,size:1,placeholder:1})
var $__0= this.props,pattern=$__0.pattern,formatCharacters=$__0.formatCharacters,size=$__0.size,placeholder=$__0.placeholder,props=(function(source, exclusion) {var rest = {};var hasOwn = Object.prototype.hasOwnProperty;if (source == null) {throw new TypeError();}for (var key in source) {if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {rest[key] = source[key];}}return rest;})($__0,{pattern:1,formatCharacters:1,size:1,placeholder:1})
var patternLength = this.mask.pattern.length

@@ -114,0 +117,0 @@ return React.createElement("input", React.__spread({}, props,

{
"name": "react-maskedinput",
"description": "Masked <input/> React component",
"version": "1.0.0",
"version": "1.1.0",
"main": "./lib/index.js",

@@ -17,3 +17,3 @@ "standalone": "MaskedInput",

"dependencies": {
"inputmask-core": "^1.1.0"
"inputmask-core": "^1.2.0"
},

@@ -20,0 +20,0 @@ "peerDependencies": {

@@ -67,2 +67,24 @@ # `MaskedInput`

Create some wrapper components if you have a masking configuration which will be
reused:
```javascript
var CustomInput = React.createClass({
render() {
return <MaskedInput
pattern="1111-WW-11"
placeholder="1234-WW-12"
size="11"
{...this.props}
formatCharacters={{
'W': {
validate(char) { return /\w/.test(char ) },
transform(char) { return char.toUpperCase() }
}
}
}/>
}
})
```
## Props

@@ -88,2 +110,9 @@

### `formatCharacters`: `Object`
Customised format character definitions for use in the pattern.
See the [inputmask-core docs](https://github.com/insin/inputmask-core#formatcharacters)
for details of the structure of this object.
### `value` : `string`

@@ -90,0 +119,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc