nativemodels
Advanced tools
+8
-9
@@ -9,10 +9,10 @@ { | ||
| "devDependencies": { | ||
| "eslint": "6.7.2", | ||
| "eslint-config-prettier": "6.7.0", | ||
| "eslint-plugin-jest": "23.1.1", | ||
| "gh-pages": "2.1.1", | ||
| "husky": "3.1.0", | ||
| "eslint": "6.8.0", | ||
| "eslint-config-prettier": "6.9.0", | ||
| "eslint-plugin-jest": "23.6.0", | ||
| "gh-pages": "2.2.0", | ||
| "husky": "4.2.0", | ||
| "jest": "24.9.0", | ||
| "js-yaml": "3.13.1", | ||
| "lint-staged": "9.5.0", | ||
| "lint-staged": "10.0.1", | ||
| "lodash.isequal": "4.5.0", | ||
@@ -35,4 +35,3 @@ "prettier": "1.19.1" | ||
| "prettier --config ./.prettierrc.json --write", | ||
| "jest --bail --findRelatedTests", | ||
| "git add" | ||
| "jest --bail --findRelatedTests" | ||
| ] | ||
@@ -56,3 +55,3 @@ }, | ||
| }, | ||
| "version": "2.8.1" | ||
| "version": "2.8.4" | ||
| } |
@@ -1,8 +0,9 @@ | ||
| const strictCheck = (schema, record) => | ||
| Object.keys(record).forEach((key) => { | ||
| if (!schema[key]) { | ||
| throw new Error(`NativeModels - Property: '${key}' is not defined in the schema`); | ||
| } | ||
| }); | ||
| const strictCheck = (schema, record) => { | ||
| const extraKeys = Object.keys(record).filter((key) => !schema[key]); | ||
| if (extraKeys.length) { | ||
| throw new Error(`NativeModels - Properties: '${extraKeys.join()}' not defined in the schema`); | ||
| } | ||
| }; | ||
| module.exports = strictCheck; |
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
40991
0.08%0
-100%