react-input-mask
Advanced tools
Comparing version 0.8.2 to 0.9.0
{ | ||
"name": "react-input-mask", | ||
"description": "Masked input component for React", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"homepage": "https://github.com/sanniassin/react-input-mask", | ||
@@ -19,31 +19,47 @@ "license": "MIT", | ||
"devDependencies": { | ||
"assert": "^1.3.0", | ||
"babel-cli": "^6.24.1", | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
"babel-plugin-transform-object-rest-spread": "^6.23.0", | ||
"babel-polyfill": "^6.23.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"babelify": "^7.3.0", | ||
"browserify": "^14.3.0", | ||
"chai": "^4.0.2", | ||
"console-polyfill": "^0.2.2", | ||
"jasmine-core": "^2.3.4", | ||
"cross-env": "^5.0.1", | ||
"karma": "^1.6.0", | ||
"karma-browserify": "^5.0.5", | ||
"karma-browserstack-launcher": "^1.0.1", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-mocha": "^1.3.0", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"mocha": "^3.2.0", | ||
"mocha": "^3.4.2", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4", | ||
"rollup": "^0.42.0", | ||
"rollup-plugin-babel": "^2.7.1", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-replace": "^1.1.1", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"watchify": "^3.7.0" | ||
}, | ||
"main": "build/InputElement.js", | ||
"main": "lib/InputElement.js", | ||
"module": "es/index.js", | ||
"jsnext:main": "es/index.js", | ||
"files": [ | ||
"es", | ||
"lib", | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "babel InputElement.js --out-dir build --presets=es2015,react --plugins transform-class-properties,transform-object-rest-spread", | ||
"prepare": "npm test && npm run build", | ||
"test": "npm run test:karma && npm run test:mocha", | ||
"test:karma": "karma start", | ||
"test:mocha": "mocha ./tests_prerender" | ||
"clean": "rimraf lib dist es", | ||
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min", | ||
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib", | ||
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es", | ||
"build:umd": "cross-env BABEL_ENV=es NODE_ENV=development rollup -c -i src/index.js -o dist/react-input-mask.js", | ||
"build:umd:min": "cross-env BABEL_ENV=es NODE_ENV=production rollup -c -i src/index.js -o dist/react-input-mask.min.js", | ||
"prepare": "npm test && npm run clean && npm run build", | ||
"test": "npm run test:input && npm run test:server-render", | ||
"test:input": "cross-env BABEL_ENV=commonjs karma start", | ||
"test:server-render": "cross-env BABEL_ENV=commonjs mocha --compilers js:babel-core/register ./tests/server-render" | ||
}, | ||
@@ -50,0 +66,0 @@ "repository": { |
# react-input-mask | ||
[![Build Status](https://img.shields.io/travis/sanniassin/react-input-mask/master.svg?style=flat)](https://travis-ci.org/sanniassin/react-input-mask) [![npm version](https://img.shields.io/npm/v/react-input-mask.svg?style=flat)](https://www.npmjs.com/package/react-input-mask) [![npm downloads](https://img.shields.io/npm/dm/react-input-mask.svg?style=flat)](https://www.npmjs.com/package/react-input-mask) | ||
Yet another React component for input masking with attention to small usability details with cursor position, copy-paste, etc. | ||
@@ -11,3 +13,12 @@ | ||
``` | ||
<br/> | ||
Also you can use `react-input-mask` without module bundler | ||
```html | ||
<!-- Load React first --> | ||
<script src="https://unpkg.com/react/dist/react.min.js"></script> | ||
<!-- Will be exported to window.ReactInputMask --> | ||
<script src="https://unpkg.com/react-input-mask/dist/react-input-mask.min.js"></script> | ||
``` | ||
## Properties | ||
@@ -44,2 +55,3 @@ ### `mask` : `string` | ||
```js | ||
import React from 'react'; | ||
import InputMask from 'react-input-mask'; | ||
@@ -49,3 +61,3 @@ | ||
render() { | ||
return <InputMask {...this.props} mask="+4\9 99 999 99" maskChar=" "/>; | ||
return <InputMask {...this.props} mask="+4\9 99 999 99" maskChar=" " />; | ||
} | ||
@@ -52,0 +64,0 @@ } |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
105151
2368
69
0
25
7
2
1