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

expect-more

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-more - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

17

CHANGELOG.md

@@ -6,2 +6,19 @@ # Change Log

## [0.8.1](https://github.com/JamieMason/expect-more/compare/expect-more@0.8.0...expect-more@0.8.1) (2020-12-06)
### Bug Fixes
* **expect:** fix circular dependencies ([dfdfe33](https://github.com/JamieMason/expect-more/commit/dfdfe335e96dbd2049ceab5ae2f59b9c5ba44288))
* **expect:** replace object with Record<any, any> ([19e282b](https://github.com/JamieMason/expect-more/commit/19e282b83ab3485081e8c9aed3db210bd09b7595))
### Performance Improvements
* **expect:** mark as side-effect free ([6750966](https://github.com/JamieMason/expect-more/commit/6750966d07bbbea2d0f24f5c5ef1dfe61ecb8676))
# [0.8.0](https://github.com/JamieMason/expect-more/compare/expect-more@0.7.1...expect-more@0.8.0) (2020-05-30)

@@ -8,0 +25,0 @@

7

dist/ends-with.js
"use strict";
exports.__esModule = true;
var index_1 = require("./index");
exports.endsWith = void 0;
var is_non_empty_string_1 = require("./is-non-empty-string");
var curry_1 = require("./lib/curry");

@@ -15,5 +16,5 @@ /**

exports.endsWith = curry_1.curry(function (otherString, value) {
return index_1.isNonEmptyString(value) &&
index_1.isNonEmptyString(otherString) &&
return is_non_empty_string_1.isNonEmptyString(value) &&
is_non_empty_string_1.isNonEmptyString(otherString) &&
value.slice(value.length - otherString.length, value.length) === otherString;
});
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
exports.__esModule = true;
exports.withNullNodes = exports.withNullLeaves = exports.withNullBranches = exports.withMissingNodes = exports.withMissingLeaves = exports.withMissingBranches = void 0;
var with_missing_branches_1 = require("./with-missing-branches");
exports.withMissingBranches = with_missing_branches_1.withMissingBranches;
__createBinding(exports, with_missing_branches_1, "withMissingBranches");
var with_missing_leaves_1 = require("./with-missing-leaves");
exports.withMissingLeaves = with_missing_leaves_1.withMissingLeaves;
__createBinding(exports, with_missing_leaves_1, "withMissingLeaves");
var with_missing_nodes_1 = require("./with-missing-nodes");
exports.withMissingNodes = with_missing_nodes_1.withMissingNodes;
__createBinding(exports, with_missing_nodes_1, "withMissingNodes");
var with_null_branches_1 = require("./with-null-branches");
exports.withNullBranches = with_null_branches_1.withNullBranches;
__createBinding(exports, with_null_branches_1, "withNullBranches");
var with_null_leaves_1 = require("./with-null-leaves");
exports.withNullLeaves = with_null_leaves_1.withNullLeaves;
__createBinding(exports, with_null_leaves_1, "withNullLeaves");
var with_null_nodes_1 = require("./with-null-nodes");
exports.withNullNodes = with_null_nodes_1.withNullNodes;
__createBinding(exports, with_null_nodes_1, "withNullNodes");

@@ -41,2 +41,3 @@ "use strict";

exports.__esModule = true;
exports.nullifyNode = exports.removeNode = exports.createTreePermuter = void 0;
var is_array_1 = require("../is-array");

@@ -217,3 +218,3 @@ var is_object_1 = require("../is-object");

}
exports.createTreePermuter = function (visitor, initialValues) {
var createTreePermuter = function (visitor, initialValues) {
if (initialValues === void 0) { initialValues = []; }

@@ -261,3 +262,4 @@ return function (rootNode) {

};
exports.removeNode = function (node, mutateNode) {
exports.createTreePermuter = createTreePermuter;
var removeNode = function (node, mutateNode) {
if (node.parentNode) {

@@ -276,3 +278,4 @@ if (node.parentNode.isArray) {

};
exports.nullifyNode = function (node, mutateNode) {
exports.removeNode = removeNode;
var nullifyNode = function (node, mutateNode) {
if (node.parentNode) {

@@ -291,1 +294,2 @@ if (node.parentNode.isArray) {

};
exports.nullifyNode = nullifyNode;
"use strict";
exports.__esModule = true;
exports.withMissingBranches = void 0;
var lib_1 = require("./lib");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.withMissingLeaves = void 0;
var lib_1 = require("./lib");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.withMissingNodes = void 0;
var lib_1 = require("./lib");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.withNullBranches = void 0;
var lib_1 = require("./lib");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.withNullLeaves = void 0;
var lib_1 = require("./lib");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.withNullNodes = void 0;
var lib_1 = require("./lib");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.hasMember = void 0;
var is_string_1 = require("./is-string");

@@ -4,0 +5,0 @@ var is_walkable_1 = require("./is-walkable");

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
exports.__esModule = true;
exports.throwsAnyError = exports.startsWith = exports.isWithinRange = exports.isWholeNumber = exports.isWhitespace = exports.isWalkable = exports.isVisibleString = exports.isValidDate = exports.isUndefined = exports.isTrue = exports.isString = exports.isShorterThan = exports.isSameLengthAs = exports.isRegExp = exports.isOddNumber = exports.isObject = exports.isNumber = exports.isNull = exports.isNonEmptyString = exports.isNonEmptyObject = exports.isNonEmptyArray = exports.isNear = exports.isLongerThan = exports.isLessThanOrEqualTo = exports.isJsonString = exports.isIso8601 = exports.isGreaterThanOrEqualTo = exports.isGeneratorFunction = exports.isFunction = exports.isFalse = exports.isEvenNumber = exports.isEmptyString = exports.isEmptyObject = exports.isEmptyArray = exports.isDivisibleBy = exports.isDecimalNumber = exports.isDate = exports.isCalculable = exports.isBoolean = exports.isBefore = exports.isAsyncFunction = exports.isArrayOfStrings = exports.isArrayOfSize = exports.isArrayOfObjects = exports.isArrayOfNumbers = exports.isArrayOfBooleans = exports.isArray = exports.isAfter = exports.hasMember = exports.endsWith = void 0;
exports.throwsErrorOfType = void 0;
var ends_with_1 = require("./ends-with");
exports.endsWith = ends_with_1.endsWith;
__createBinding(exports, ends_with_1, "endsWith");
var has_member_1 = require("./has-member");
exports.hasMember = has_member_1.hasMember;
__createBinding(exports, has_member_1, "hasMember");
var is_after_1 = require("./is-after");
exports.isAfter = is_after_1.isAfter;
__createBinding(exports, is_after_1, "isAfter");
var is_array_1 = require("./is-array");
exports.isArray = is_array_1.isArray;
__createBinding(exports, is_array_1, "isArray");
var is_array_of_booleans_1 = require("./is-array-of-booleans");
exports.isArrayOfBooleans = is_array_of_booleans_1.isArrayOfBooleans;
__createBinding(exports, is_array_of_booleans_1, "isArrayOfBooleans");
var is_array_of_numbers_1 = require("./is-array-of-numbers");
exports.isArrayOfNumbers = is_array_of_numbers_1.isArrayOfNumbers;
__createBinding(exports, is_array_of_numbers_1, "isArrayOfNumbers");
var is_array_of_objects_1 = require("./is-array-of-objects");
exports.isArrayOfObjects = is_array_of_objects_1.isArrayOfObjects;
__createBinding(exports, is_array_of_objects_1, "isArrayOfObjects");
var is_array_of_size_1 = require("./is-array-of-size");
exports.isArrayOfSize = is_array_of_size_1.isArrayOfSize;
__createBinding(exports, is_array_of_size_1, "isArrayOfSize");
var is_array_of_strings_1 = require("./is-array-of-strings");
exports.isArrayOfStrings = is_array_of_strings_1.isArrayOfStrings;
__createBinding(exports, is_array_of_strings_1, "isArrayOfStrings");
var is_async_function_1 = require("./is-async-function");
exports.isAsyncFunction = is_async_function_1.isAsyncFunction;
__createBinding(exports, is_async_function_1, "isAsyncFunction");
var is_before_1 = require("./is-before");
exports.isBefore = is_before_1.isBefore;
__createBinding(exports, is_before_1, "isBefore");
var is_boolean_1 = require("./is-boolean");
exports.isBoolean = is_boolean_1.isBoolean;
__createBinding(exports, is_boolean_1, "isBoolean");
var is_calculable_1 = require("./is-calculable");
exports.isCalculable = is_calculable_1.isCalculable;
__createBinding(exports, is_calculable_1, "isCalculable");
var is_date_1 = require("./is-date");
exports.isDate = is_date_1.isDate;
__createBinding(exports, is_date_1, "isDate");
var is_decimal_number_1 = require("./is-decimal-number");
exports.isDecimalNumber = is_decimal_number_1.isDecimalNumber;
__createBinding(exports, is_decimal_number_1, "isDecimalNumber");
var is_divisible_by_1 = require("./is-divisible-by");
exports.isDivisibleBy = is_divisible_by_1.isDivisibleBy;
__createBinding(exports, is_divisible_by_1, "isDivisibleBy");
var is_empty_array_1 = require("./is-empty-array");
exports.isEmptyArray = is_empty_array_1.isEmptyArray;
__createBinding(exports, is_empty_array_1, "isEmptyArray");
var is_empty_object_1 = require("./is-empty-object");
exports.isEmptyObject = is_empty_object_1.isEmptyObject;
__createBinding(exports, is_empty_object_1, "isEmptyObject");
var is_empty_string_1 = require("./is-empty-string");
exports.isEmptyString = is_empty_string_1.isEmptyString;
__createBinding(exports, is_empty_string_1, "isEmptyString");
var is_even_number_1 = require("./is-even-number");
exports.isEvenNumber = is_even_number_1.isEvenNumber;
__createBinding(exports, is_even_number_1, "isEvenNumber");
var is_false_1 = require("./is-false");
exports.isFalse = is_false_1.isFalse;
__createBinding(exports, is_false_1, "isFalse");
var is_function_1 = require("./is-function");
exports.isFunction = is_function_1.isFunction;
__createBinding(exports, is_function_1, "isFunction");
var is_generator_function_1 = require("./is-generator-function");
exports.isGeneratorFunction = is_generator_function_1.isGeneratorFunction;
__createBinding(exports, is_generator_function_1, "isGeneratorFunction");
var is_greater_than_or_equal_to_1 = require("./is-greater-than-or-equal-to");
exports.isGreaterThanOrEqualTo = is_greater_than_or_equal_to_1.isGreaterThanOrEqualTo;
__createBinding(exports, is_greater_than_or_equal_to_1, "isGreaterThanOrEqualTo");
var is_iso_8601_1 = require("./is-iso-8601");
exports.isIso8601 = is_iso_8601_1.isIso8601;
__createBinding(exports, is_iso_8601_1, "isIso8601");
var is_json_string_1 = require("./is-json-string");
exports.isJsonString = is_json_string_1.isJsonString;
__createBinding(exports, is_json_string_1, "isJsonString");
var is_less_than_or_equal_to_1 = require("./is-less-than-or-equal-to");
exports.isLessThanOrEqualTo = is_less_than_or_equal_to_1.isLessThanOrEqualTo;
__createBinding(exports, is_less_than_or_equal_to_1, "isLessThanOrEqualTo");
var is_longer_than_1 = require("./is-longer-than");
exports.isLongerThan = is_longer_than_1.isLongerThan;
__createBinding(exports, is_longer_than_1, "isLongerThan");
var is_near_1 = require("./is-near");
exports.isNear = is_near_1.isNear;
__createBinding(exports, is_near_1, "isNear");
var is_non_empty_array_1 = require("./is-non-empty-array");
exports.isNonEmptyArray = is_non_empty_array_1.isNonEmptyArray;
__createBinding(exports, is_non_empty_array_1, "isNonEmptyArray");
var is_non_empty_object_1 = require("./is-non-empty-object");
exports.isNonEmptyObject = is_non_empty_object_1.isNonEmptyObject;
__createBinding(exports, is_non_empty_object_1, "isNonEmptyObject");
var is_non_empty_string_1 = require("./is-non-empty-string");
exports.isNonEmptyString = is_non_empty_string_1.isNonEmptyString;
__createBinding(exports, is_non_empty_string_1, "isNonEmptyString");
var is_null_1 = require("./is-null");
exports.isNull = is_null_1.isNull;
__createBinding(exports, is_null_1, "isNull");
var is_number_1 = require("./is-number");
exports.isNumber = is_number_1.isNumber;
__createBinding(exports, is_number_1, "isNumber");
var is_object_1 = require("./is-object");
exports.isObject = is_object_1.isObject;
__createBinding(exports, is_object_1, "isObject");
var is_odd_number_1 = require("./is-odd-number");
exports.isOddNumber = is_odd_number_1.isOddNumber;
__createBinding(exports, is_odd_number_1, "isOddNumber");
var is_reg_exp_1 = require("./is-reg-exp");
exports.isRegExp = is_reg_exp_1.isRegExp;
__createBinding(exports, is_reg_exp_1, "isRegExp");
var is_same_length_as_1 = require("./is-same-length-as");
exports.isSameLengthAs = is_same_length_as_1.isSameLengthAs;
__createBinding(exports, is_same_length_as_1, "isSameLengthAs");
var is_shorter_than_1 = require("./is-shorter-than");
exports.isShorterThan = is_shorter_than_1.isShorterThan;
__createBinding(exports, is_shorter_than_1, "isShorterThan");
var is_string_1 = require("./is-string");
exports.isString = is_string_1.isString;
__createBinding(exports, is_string_1, "isString");
var is_true_1 = require("./is-true");
exports.isTrue = is_true_1.isTrue;
__createBinding(exports, is_true_1, "isTrue");
var is_undefined_1 = require("./is-undefined");
exports.isUndefined = is_undefined_1.isUndefined;
__createBinding(exports, is_undefined_1, "isUndefined");
var is_valid_date_1 = require("./is-valid-date");
exports.isValidDate = is_valid_date_1.isValidDate;
__createBinding(exports, is_valid_date_1, "isValidDate");
var is_visible_string_1 = require("./is-visible-string");
exports.isVisibleString = is_visible_string_1.isVisibleString;
__createBinding(exports, is_visible_string_1, "isVisibleString");
var is_walkable_1 = require("./is-walkable");
exports.isWalkable = is_walkable_1.isWalkable;
__createBinding(exports, is_walkable_1, "isWalkable");
var is_whitespace_1 = require("./is-whitespace");
exports.isWhitespace = is_whitespace_1.isWhitespace;
__createBinding(exports, is_whitespace_1, "isWhitespace");
var is_whole_number_1 = require("./is-whole-number");
exports.isWholeNumber = is_whole_number_1.isWholeNumber;
__createBinding(exports, is_whole_number_1, "isWholeNumber");
var is_within_range_1 = require("./is-within-range");
exports.isWithinRange = is_within_range_1.isWithinRange;
__createBinding(exports, is_within_range_1, "isWithinRange");
var starts_with_1 = require("./starts-with");
exports.startsWith = starts_with_1.startsWith;
__createBinding(exports, starts_with_1, "startsWith");
var throws_any_error_1 = require("./throws-any-error");
exports.throwsAnyError = throws_any_error_1.throwsAnyError;
__createBinding(exports, throws_any_error_1, "throwsAnyError");
var throws_error_of_type_1 = require("./throws-error-of-type");
exports.throwsErrorOfType = throws_error_of_type_1.throwsErrorOfType;
__createBinding(exports, throws_error_of_type_1, "throwsErrorOfType");
"use strict";
exports.__esModule = true;
exports.isAfter = void 0;
var is_date_1 = require("./is-date");

@@ -4,0 +5,0 @@ var curry_1 = require("./lib/curry");

"use strict";
exports.__esModule = true;
exports.isArrayOfBooleans = void 0;
var is_array_1 = require("./is-array");

@@ -16,4 +17,5 @@ var is_boolean_1 = require("./is-boolean");

*/
exports.isArrayOfBooleans = function (value) {
var isArrayOfBooleans = function (value) {
return is_array_1.isArray(value) && every_1.every(is_boolean_1.isBoolean, value);
};
exports.isArrayOfBooleans = isArrayOfBooleans;
"use strict";
exports.__esModule = true;
exports.isArrayOfNumbers = void 0;
var is_array_1 = require("./is-array");

@@ -16,4 +17,5 @@ var is_number_1 = require("./is-number");

*/
exports.isArrayOfNumbers = function (value) {
var isArrayOfNumbers = function (value) {
return is_array_1.isArray(value) && every_1.every(is_number_1.isNumber, value);
};
exports.isArrayOfNumbers = isArrayOfNumbers;

@@ -11,2 +11,2 @@ /**

*/
export declare const isArrayOfObjects: (value: any) => value is object[];
export declare const isArrayOfObjects: (value: any) => value is Record<any, any>[];
"use strict";
exports.__esModule = true;
exports.isArrayOfObjects = void 0;
var is_array_1 = require("./is-array");

@@ -16,4 +17,5 @@ var is_object_1 = require("./is-object");

*/
exports.isArrayOfObjects = function (value) {
var isArrayOfObjects = function (value) {
return is_array_1.isArray(value) && every_1.every(is_object_1.isObject, value);
};
exports.isArrayOfObjects = isArrayOfObjects;
"use strict";
exports.__esModule = true;
exports.isArrayOfSize = void 0;
var is_array_1 = require("./is-array");

@@ -4,0 +5,0 @@ var is_number_1 = require("./is-number");

"use strict";
exports.__esModule = true;
exports.isArrayOfStrings = void 0;
var is_array_1 = require("./is-array");

@@ -16,4 +17,5 @@ var is_string_1 = require("./is-string");

*/
exports.isArrayOfStrings = function (value) {
var isArrayOfStrings = function (value) {
return is_array_1.isArray(value) && every_1.every(is_string_1.isString, value);
};
exports.isArrayOfStrings = isArrayOfStrings;
"use strict";
exports.__esModule = true;
exports.isArray = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isAsyncFunction = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isBefore = void 0;
var is_after_1 = require("./is-after");

@@ -4,0 +5,0 @@ var curry_1 = require("./lib/curry");

"use strict";
exports.__esModule = true;
exports.isBoolean = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isCalculable = void 0;
/**

@@ -14,2 +15,3 @@ * Assert value can be used in Mathemetic calculations despite not being a

*/
exports.isCalculable = function (value) { return !isNaN(value * 2); };
var isCalculable = function (value) { return !isNaN(value * 2); };
exports.isCalculable = isCalculable;
"use strict";
exports.__esModule = true;
exports.isDate = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isDecimalNumber = void 0;
var is_number_1 = require("./is-number");

@@ -13,4 +14,5 @@ /**

*/
exports.isDecimalNumber = function (value) {
var isDecimalNumber = function (value) {
return is_number_1.isNumber(value) && String(value).indexOf('.') !== -1;
};
exports.isDecimalNumber = isDecimalNumber;
"use strict";
exports.__esModule = true;
exports.isDivisibleBy = void 0;
var is_number_1 = require("./is-number");

@@ -4,0 +5,0 @@ var curry_1 = require("./lib/curry");

"use strict";
exports.__esModule = true;
exports.isEmptyArray = void 0;
var is_array_of_size_1 = require("./is-array-of-size");

@@ -12,2 +13,3 @@ /**

*/
exports.isEmptyArray = function (value) { return is_array_of_size_1.isArrayOfSize(0, value); };
var isEmptyArray = function (value) { return is_array_of_size_1.isArrayOfSize(0, value); };
exports.isEmptyArray = isEmptyArray;
"use strict";
exports.__esModule = true;
exports.isEmptyObject = void 0;
var is_object_1 = require("./is-object");

@@ -13,2 +14,3 @@ var keys_1 = require("./lib/keys");

*/
exports.isEmptyObject = function (value) { return is_object_1.isObject(value) && keys_1.keys(value).length === 0; };
var isEmptyObject = function (value) { return is_object_1.isObject(value) && keys_1.keys(value).length === 0; };
exports.isEmptyObject = isEmptyObject;
"use strict";
exports.__esModule = true;
exports.isEmptyString = void 0;
var is_string_1 = require("./is-string");

@@ -14,2 +15,3 @@ /**

*/
exports.isEmptyString = function (value) { return is_string_1.isString(value) && value.length === 0; };
var isEmptyString = function (value) { return is_string_1.isString(value) && value.length === 0; };
exports.isEmptyString = isEmptyString;
"use strict";
exports.__esModule = true;
exports.isEvenNumber = void 0;
var is_divisible_by_1 = require("./is-divisible-by");

@@ -13,2 +14,3 @@ var is_number_1 = require("./is-number");

*/
exports.isEvenNumber = function (value) { return is_number_1.isNumber(value) && is_divisible_by_1.isDivisibleBy(2, value); };
var isEvenNumber = function (value) { return is_number_1.isNumber(value) && is_divisible_by_1.isDivisibleBy(2, value); };
exports.isEvenNumber = isEvenNumber;
"use strict";
exports.__esModule = true;
exports.isFalse = void 0;
var is_boolean_1 = require("./is-boolean");

@@ -12,4 +13,5 @@ /**

*/
exports.isFalse = function (value) {
var isFalse = function (value) {
return value === false || (is_boolean_1.isBoolean(value) && value.valueOf() === false);
};
exports.isFalse = isFalse;
"use strict";
exports.__esModule = true;
exports.isFunction = void 0;
/**

@@ -11,4 +12,5 @@ * Asserts that ${value} is a `Function`.

*/
exports.isFunction = function (value) {
var isFunction = function (value) {
return typeof value === 'function';
};
exports.isFunction = isFunction;
"use strict";
exports.__esModule = true;
exports.isGeneratorFunction = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isGreaterThanOrEqualTo = void 0;
var is_number_1 = require("./is-number");

@@ -4,0 +5,0 @@ var curry_1 = require("./lib/curry");

"use strict";
exports.__esModule = true;
exports.isIso8601 = void 0;
var is_string_1 = require("./is-string");

@@ -14,3 +15,3 @@ var is_valid_date_1 = require("./is-valid-date");

*/
exports.isIso8601 = function (value) {
var isIso8601 = function (value) {
// '1999-12-31'

@@ -29,1 +30,2 @@ // '1999-12-31T23:59'

};
exports.isIso8601 = isIso8601;
"use strict";
exports.__esModule = true;
exports.isJsonString = void 0;
/**

@@ -11,3 +12,3 @@ * Asserts that ${value} is a `String` of valid JSON.

*/
exports.isJsonString = function (value) {
var isJsonString = function (value) {
try {

@@ -20,1 +21,2 @@ return JSON.parse(value) !== null;

};
exports.isJsonString = isJsonString;
"use strict";
exports.__esModule = true;
exports.isLessThanOrEqualTo = void 0;
var is_number_1 = require("./is-number");

@@ -4,0 +5,0 @@ var curry_1 = require("./lib/curry");

"use strict";
exports.__esModule = true;
exports.isLongerThan = void 0;
var curry_1 = require("./lib/curry");

@@ -4,0 +5,0 @@ var is_indexed_list_1 = require("./lib/is-indexed-list");

"use strict";
exports.__esModule = true;
exports.isNear = void 0;
var is_within_range_1 = require("./is-within-range");

@@ -4,0 +5,0 @@ var curry_1 = require("./lib/curry");

"use strict";
exports.__esModule = true;
exports.isNonEmptyArray = void 0;
var is_array_1 = require("./is-array");

@@ -13,2 +14,3 @@ /**

*/
exports.isNonEmptyArray = function (value) { return is_array_1.isArray(value) && value.length > 0; };
var isNonEmptyArray = function (value) { return is_array_1.isArray(value) && value.length > 0; };
exports.isNonEmptyArray = isNonEmptyArray;
"use strict";
exports.__esModule = true;
exports.isNonEmptyObject = void 0;
var is_object_1 = require("./is-object");

@@ -15,2 +16,3 @@ var keys_1 = require("./lib/keys");

*/
exports.isNonEmptyObject = function (value) { return is_object_1.isObject(value) && keys_1.keys(value).length > 0; };
var isNonEmptyObject = function (value) { return is_object_1.isObject(value) && keys_1.keys(value).length > 0; };
exports.isNonEmptyObject = isNonEmptyObject;
"use strict";
exports.__esModule = true;
exports.isNonEmptyString = void 0;
var is_string_1 = require("./is-string");

@@ -13,2 +14,3 @@ /**

*/
exports.isNonEmptyString = function (value) { return is_string_1.isString(value) && value.length > 0; };
var isNonEmptyString = function (value) { return is_string_1.isString(value) && value.length > 0; };
exports.isNonEmptyString = isNonEmptyString;
"use strict";
exports.__esModule = true;
exports.isNull = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isNumber = void 0;
var has_type_1 = require("./lib/has-type");

@@ -12,4 +13,5 @@ /**

*/
exports.isNumber = function (value) {
var isNumber = function (value) {
return has_type_1.hasType('Number')(value) && !isNaN(parseFloat(String(value)));
};
exports.isNumber = isNumber;
"use strict";
exports.__esModule = true;
exports.isObject = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isOddNumber = void 0;
var is_divisible_by_1 = require("./is-divisible-by");

@@ -13,2 +14,3 @@ var is_number_1 = require("./is-number");

*/
exports.isOddNumber = function (value) { return is_number_1.isNumber(value) && !is_divisible_by_1.isDivisibleBy(2, value); };
var isOddNumber = function (value) { return is_number_1.isNumber(value) && !is_divisible_by_1.isDivisibleBy(2, value); };
exports.isOddNumber = isOddNumber;
"use strict";
exports.__esModule = true;
exports.isRegExp = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isSameLengthAs = void 0;
var curry_1 = require("./lib/curry");

@@ -4,0 +5,0 @@ var is_indexed_list_1 = require("./lib/is-indexed-list");

"use strict";
exports.__esModule = true;
exports.isShorterThan = void 0;
var curry_1 = require("./lib/curry");

@@ -4,0 +5,0 @@ var is_indexed_list_1 = require("./lib/is-indexed-list");

"use strict";
exports.__esModule = true;
exports.isString = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isTrue = void 0;
var is_boolean_1 = require("./is-boolean");

@@ -12,4 +13,5 @@ /**

*/
exports.isTrue = function (value) {
var isTrue = function (value) {
return value === true || (is_boolean_1.isBoolean(value) && value.valueOf() === true);
};
exports.isTrue = isTrue;
"use strict";
exports.__esModule = true;
exports.isUndefined = void 0;
var has_type_1 = require("./lib/has-type");

@@ -4,0 +5,0 @@ /**

"use strict";
exports.__esModule = true;
exports.isValidDate = void 0;
var is_date_1 = require("./is-date");

@@ -17,2 +18,3 @@ /**

*/
exports.isValidDate = function (value) { return is_date_1.isDate(value) && !isNaN(value.getTime()); };
var isValidDate = function (value) { return is_date_1.isDate(value) && !isNaN(value.getTime()); };
exports.isValidDate = isValidDate;
"use strict";
exports.__esModule = true;
exports.isVisibleString = void 0;
var is_string_1 = require("./is-string");

@@ -15,4 +16,5 @@ /**

*/
exports.isVisibleString = function (value) {
var isVisibleString = function (value) {
return is_string_1.isString(value) && value.length > 0 && value.search(/\S/) !== -1;
};
exports.isVisibleString = isVisibleString;
"use strict";
exports.__esModule = true;
exports.isWalkable = void 0;
var is_null_1 = require("./is-null");

@@ -13,2 +14,3 @@ var is_undefined_1 = require("./is-undefined");

*/
exports.isWalkable = function (value) { return !is_null_1.isNull(value) && !is_undefined_1.isUndefined(value); };
var isWalkable = function (value) { return !is_null_1.isNull(value) && !is_undefined_1.isUndefined(value); };
exports.isWalkable = isWalkable;
"use strict";
exports.__esModule = true;
exports.isWhitespace = void 0;
var is_string_1 = require("./is-string");

@@ -14,2 +15,3 @@ /**

*/
exports.isWhitespace = function (value) { return is_string_1.isString(value) && value.search(/\S/) === -1; };
var isWhitespace = function (value) { return is_string_1.isString(value) && value.search(/\S/) === -1; };
exports.isWhitespace = isWhitespace;
"use strict";
exports.__esModule = true;
exports.isWholeNumber = void 0;
var is_divisible_by_1 = require("./is-divisible-by");

@@ -13,4 +14,5 @@ var is_number_1 = require("./is-number");

*/
exports.isWholeNumber = function (value) {
var isWholeNumber = function (value) {
return is_number_1.isNumber(value) && (value === 0 || is_divisible_by_1.isDivisibleBy(1, value));
};
exports.isWholeNumber = isWholeNumber;
"use strict";
exports.__esModule = true;
exports.isWithinRange = void 0;
var is_greater_than_or_equal_to_1 = require("./is-greater-than-or-equal-to");

@@ -4,0 +5,0 @@ var is_less_than_or_equal_to_1 = require("./is-less-than-or-equal-to");

"use strict";
exports.__esModule = true;
exports.curry = void 0;
var curryFn = function (fn, argsCache, self) {

@@ -14,2 +15,3 @@ return fn.length <= argsCache.length

};
exports.curry = function (fn, self) { return curryFn(fn, [], self); };
var curry = function (fn, self) { return curryFn(fn, [], self); };
exports.curry = curry;
"use strict";
exports.__esModule = true;
exports.every = void 0;
var curry_1 = require("./curry");

@@ -4,0 +5,0 @@ exports.every = curry_1.curry(function (fn, array) {

"use strict";
exports.__esModule = true;
exports.getType = function (value) { return Object.prototype.toString.call(value); };
exports.getType = void 0;
var getType = function (value) { return Object.prototype.toString.call(value); };
exports.getType = getType;
"use strict";
exports.__esModule = true;
exports.hasType = void 0;
var get_type_1 = require("./get-type");
exports.hasType = function (type) { return function (value) {
var hasType = function (type) { return function (value) {
return get_type_1.getType(value) === "[object " + type + "]";
}; };
exports.hasType = hasType;
"use strict";
exports.__esModule = true;
exports.isIndexedList = void 0;
var is_array_1 = require("../is-array");
var is_string_1 = require("../is-string");
exports.isIndexedList = function (value) { return is_string_1.isString(value) || is_array_1.isArray(value); };
var isIndexedList = function (value) { return is_string_1.isString(value) || is_array_1.isArray(value); };
exports.isIndexedList = isIndexedList;

@@ -1,1 +0,1 @@

export declare const keys: (object: object) => string[];
export declare const keys: (object: Record<any, any>) => string[];
"use strict";
exports.__esModule = true;
exports.keys = function (object) {
exports.keys = void 0;
var keys = function (object) {
var returnValue = [];

@@ -12,1 +13,2 @@ for (var key in object) {

};
exports.keys = keys;
"use strict";
exports.__esModule = true;
var index_1 = require("./index");
exports.startsWith = void 0;
var is_non_empty_string_1 = require("./is-non-empty-string");
var curry_1 = require("./lib/curry");

@@ -15,5 +16,5 @@ /**

exports.startsWith = curry_1.curry(function (otherString, value) {
return index_1.isNonEmptyString(value) &&
index_1.isNonEmptyString(otherString) &&
return is_non_empty_string_1.isNonEmptyString(value) &&
is_non_empty_string_1.isNonEmptyString(otherString) &&
value.slice(0, otherString.length) === otherString;
});
"use strict";
exports.__esModule = true;
exports.throwsAnyError = void 0;
/**

@@ -11,3 +12,3 @@ * Asserts that ${value} is a `Function` which throws when invoked.

*/
exports.throwsAnyError = function (value) {
var throwsAnyError = function (value) {
try {

@@ -21,1 +22,2 @@ value();

};
exports.throwsAnyError = throwsAnyError;
"use strict";
exports.__esModule = true;
exports.throwsErrorOfType = void 0;
var curry_1 = require("./lib/curry");

@@ -4,0 +5,0 @@ /**

@@ -1,4 +0,4 @@

export declare type Collection = any[] | object;
export declare type Collection = any[] | Record<any, any>;
export declare type VoidFn = () => void;
export declare type UnaryBoolFn = (value: any) => boolean;
export declare type Reducer = (memo: any, value: any, key: number | string, collection: Collection) => any;
{
"name": "expect-more",
"description": "Curried JavaScript Type Testing Library with Zero Dependencies",
"version": "0.8.0",
"version": "0.8.1",
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",

@@ -18,4 +18,5 @@ "bugs": "https://github.com/JamieMason/expect-more/issues",

},
"sideEffects": false,
"typings": "./dist/index.d.ts",
"gitHead": "fa73b3477df2f0c4c75ffefa825b91af484aabee"
"gitHead": "e3e1831e55dbe87180348e85ed9ea34f96d9e27b"
}
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