expect-more
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -7,3 +7,4 @@ "use strict"; | ||
var every_1 = require("./lib/every"); | ||
var includes_1 = require("./lib/includes"); | ||
var is_jest_equal_1 = require("./lib/is-jest-equal"); | ||
var some_1 = require("./lib/some"); | ||
/** | ||
@@ -26,3 +27,3 @@ * Asserts that `value` is an `Array` including all of the values provided in | ||
(0, is_array_1.isArray)(value) && | ||
(0, every_1.every)(function (requiredValue) { return (0, includes_1.includes)(requiredValue, value); }, requiredValues); | ||
(0, every_1.every)(function (requiredValue) { return (0, some_1.some)((0, is_jest_equal_1.isJestEqual)(requiredValue), value); }, requiredValues); | ||
}); |
/** | ||
* Asserts that `value` is an `Array` including at least one of the members of | ||
* `values`. | ||
* @param values ['Ginola', 3] | ||
* `allowedValues`. | ||
* @param allowedValues ['Ginola', 3] | ||
* @param value [12, 0, 14, 'Ginola'] | ||
@@ -9,6 +9,6 @@ * @matcherName toBeArrayIncludingAnyOf | ||
* @matcherMessage expected ${value} to include at least one of the values in | ||
* ${values} | ||
* ${allowedValues} | ||
* @matcherNotMessage expected ${value} not to include at least one of the | ||
* values in ${values} | ||
* values in ${allowedValues} | ||
*/ | ||
export declare const isArrayIncludingAnyOf: import("./lib/curry2").CurriedFn2<any[]>; |
@@ -6,8 +6,8 @@ "use strict"; | ||
var curry2_1 = require("./lib/curry2"); | ||
var includes_1 = require("./lib/includes"); | ||
var is_jest_equal_1 = require("./lib/is-jest-equal"); | ||
var some_1 = require("./lib/some"); | ||
/** | ||
* Asserts that `value` is an `Array` including at least one of the members of | ||
* `values`. | ||
* @param values ['Ginola', 3] | ||
* `allowedValues`. | ||
* @param allowedValues ['Ginola', 3] | ||
* @param value [12, 0, 14, 'Ginola'] | ||
@@ -17,8 +17,10 @@ * @matcherName toBeArrayIncludingAnyOf | ||
* @matcherMessage expected ${value} to include at least one of the values in | ||
* ${values} | ||
* ${allowedValues} | ||
* @matcherNotMessage expected ${value} not to include at least one of the | ||
* values in ${values} | ||
* values in ${allowedValues} | ||
*/ | ||
exports.isArrayIncludingAnyOf = (0, curry2_1.curry2)(function (values, value) { | ||
return (0, is_array_1.isArray)(values) && (0, some_1.some)(function (other) { return (0, includes_1.includes)(other, value); }, values); | ||
exports.isArrayIncludingAnyOf = (0, curry2_1.curry2)(function (allowedValues, value) { | ||
return (0, is_array_1.isArray)(allowedValues) && | ||
(0, is_array_1.isArray)(value) && | ||
(0, some_1.some)(function (allowedValue) { return (0, some_1.some)((0, is_jest_equal_1.isJestEqual)(allowedValue), value); }, allowedValues); | ||
}); |
@@ -7,3 +7,4 @@ "use strict"; | ||
var every_1 = require("./lib/every"); | ||
var includes_1 = require("./lib/includes"); | ||
var is_jest_equal_1 = require("./lib/is-jest-equal"); | ||
var some_1 = require("./lib/some"); | ||
/** | ||
@@ -26,3 +27,3 @@ * Asserts that a value is an `Array` including only the values provided in the | ||
(0, is_array_1.isArray)(value) && | ||
(0, every_1.every)(function (member) { return (0, includes_1.includes)(member, allowedValues); }, value); | ||
(0, every_1.every)(function (member) { return (0, some_1.some)((0, is_jest_equal_1.isJestEqual)(member), allowedValues); }, value); | ||
}); |
@@ -0,3 +1,3 @@ | ||
import { CurriedFn1 } from './curry1'; | ||
import { CurriedFn2 } from './curry2'; | ||
import { CurriedFn1 } from './curry1'; | ||
type Fn3<R = any> = (c: unknown, b: unknown, a: unknown) => a is R; | ||
@@ -4,0 +4,0 @@ export type CurriedFn3<R = any> = { |
"use strict"; | ||
exports.__esModule = true; | ||
exports.curry3 = void 0; | ||
var curry1_1 = require("./curry1"); | ||
var curry2_1 = require("./curry2"); | ||
var curry1_1 = require("./curry1"); | ||
function curry3(fn) { | ||
@@ -7,0 +7,0 @@ return function curriedFn3(c, b, a) { |
{ | ||
"name": "expect-more", | ||
"description": "Curried JavaScript Type Testing Library with Zero Dependencies", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)", | ||
@@ -20,3 +20,3 @@ "bugs": "https://github.com/JamieMason/expect-more/issues", | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "ce89d4df67ac3e252b404636e571d6fa1b4dd0a1" | ||
"gitHead": "af8b028b34f4b19f6e3259aa9e18d14171e75803" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121941
173
2721