🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

nativemodels

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativemodels - npm Package Compare versions

Comparing version
2.8.1
to
2.8.4
+8
-9
package.json

@@ -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;