easily-expect
Advanced tools
Comparing version
@@ -67,5 +67,12 @@ 'use strict' | ||
} | ||
exports.checkAllKeys = function checkAllKeys (keyNames, ...objects) { | ||
exports.checkType('object', ...objects) | ||
for (let i = 0; i < keyNames.length; i++) { | ||
for (let j = 0; j < objects.length; j++) { | ||
exports.checkEqual(true, Boolean(objects[j][keyNames[i]])) | ||
} | ||
} | ||
} | ||
exports.init = data => { | ||
cacheData = data | ||
} |
{ | ||
"name": "easily-expect", | ||
"version": "0.1.7", | ||
"version": "1.0.0", | ||
"description": "You can easily use expect", | ||
@@ -10,2 +10,6 @@ "main": "index.js", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/KSH-code/easily-expect.git" | ||
}, | ||
"author": "KSH-Code <tjdgnsqn133@gmail.com> (github.com/ksh-code)", | ||
@@ -12,0 +16,0 @@ "license": "MIT", |
@@ -35,2 +35,5 @@ [](https://travis-ci.org/KSH-code/easily-expect) | ||
}) | ||
it('Check Strings in Array', () => { | ||
checkArray([/^\d*$/, /[a-z]{1,10}/], ['123', 'a', '123', 'a'], ['123', 'a', '123', 'a']) | ||
}) | ||
@@ -45,1 +48,2 @@ ``` | ||
* [checkValue](https://github.com/KSH-code/easily-expect/blob/master/test/checkValue.test.js) | ||
* [checkAllKeys](https://github.com/KSH-code/easily-expect/blob/master/test/checkAllKeys.test.js) |
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10839
9.63%13
8.33%204
10.87%1
-50%48
9.09%0
-100%