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

calidation

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calidation - npm Package Compare versions

Comparing version 0.0.0-development to 1.0.0

101

package.json
{
"name": "calidation",
"version": "0.0.0-development",
"description": "A red hot validation library for React",
"main": "dist/index.js",
"keywords": ["validation", "react", "react validation"],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/selbekk/calidation"
},
"scripts": {
"prebuild": "rimraf dist",
"build": "babel --out-dir dist --ignore *.spec.js src",
"precommit": "pretty-quick --staged",
"commit": "git-cz",
"test": "jest",
"test:watch": "jest --watch",
"semantic-release": "semantic-release",
"travis-deploy-once": "travis-deploy-once"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.1.0",
"husky": "^0.14.3",
"jest": "^22.4.3",
"prettier": "^1.11.1",
"pretty-quick": "^1.4.1",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"rimraf": "^2.6.2",
"semantic-release": "^15.1.5",
"travis-deploy-once": "^4.4.1"
},
"peerDependencies": {
"react": "^16.3.1",
"react-dom": "^16.3.1"
},
"files": ["README.md", "dist"],
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
"name": "calidation",
"version": "1.0.0",
"description": "A red hot validation library for React",
"main": "dist/index.js",
"keywords": [
"validation",
"react",
"react validation"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/selbekk/calidation"
},
"scripts": {
"prebuild": "rimraf dist",
"build": "babel --out-dir dist --ignore *.spec.js src",
"precommit": "pretty-quick --staged",
"commit": "git-cz",
"test": "jest",
"test:watch": "jest --watch",
"semantic-release": "semantic-release",
"travis-deploy-once": "travis-deploy-once"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.1.0",
"husky": "^0.14.3",
"jest": "^22.4.3",
"prettier": "^1.11.1",
"pretty-quick": "^1.4.1",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"rimraf": "^2.6.2",
"semantic-release": "^15.1.5",
"travis-deploy-once": "^4.4.1"
},
"peerDependencies": {
"react": "^16.3.1",
"react-dom": "^16.3.1"
},
"files": [
"README.md",
"dist"
],
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
}
}

@@ -267,14 +267,16 @@ # calidation

You can add your own too! In that case, wrap your app with the
`<ValidatorProvider />` component, and pass it an object with your custom
`<ValidatorsProvider />` component, and pass it an object with your custom
validators. It can look like this:
```js
import { ValidatorsProvider } from 'calidation';
const extraValidators = {
isEven: config => value => Number(value) % 2 !== 0 ? config.message : null,
isOdd: config => value => Number(value) % 2 !== 1 ? config.message : null,
isEven: config => value =>
Number(value) % 2 !== 0 ? config.message : null,
isOdd: config => value => (Number(value) % 2 !== 1 ? config.message : null),
};
<ValidationProvider validators={extraValidators}>
<App />
</ValidatorProvider>
<ValidatorsProvider validators={extraValidators}>
<App />
</ValidatorsProvider>;
```

@@ -281,0 +283,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