@apigames/json 1.0.57 → 21.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +5 -1
- package/package.json +9 -9
package/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { append, areEqual, clone, extractAndRedact, hasProperty, isArray, isBoolean, isDate, isDefined, isDefinedAndNotNull, isEmpty, isError, isFalse, isNumber, isObject, isRegExp, isString, isTrue, isUndefined, isUndefinedOrNull, redactUndefinedValues, stringify, } from './utils';
|
|
1
|
+
export { append, areEqual, clone, extractAndRedact, hasProperty, isArray, isBoolean, isDate, isDefined, isDefinedAndNotNull, isEmpty, isError, isFalse, isInteger, isNumber, isObject, isRegExp, isString, isTrue, isUndefined, isUndefinedOrNull, redactUndefinedValues, stringify, } from './utils';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringify = exports.redactUndefinedValues = exports.isUndefinedOrNull = exports.isUndefined = exports.isTrue = exports.isString = exports.isRegExp = exports.isObject = exports.isNumber = exports.isFalse = exports.isError = exports.isEmpty = exports.isDefinedAndNotNull = exports.isDefined = exports.isDate = exports.isBoolean = exports.isArray = exports.hasProperty = exports.extractAndRedact = exports.clone = exports.areEqual = exports.append = void 0;
|
|
3
|
+
exports.stringify = exports.redactUndefinedValues = exports.isUndefinedOrNull = exports.isUndefined = exports.isTrue = exports.isString = exports.isRegExp = exports.isObject = exports.isNumber = exports.isInteger = exports.isFalse = exports.isError = exports.isEmpty = exports.isDefinedAndNotNull = exports.isDefined = exports.isDate = exports.isBoolean = exports.isArray = exports.hasProperty = exports.extractAndRedact = exports.clone = exports.areEqual = exports.append = void 0;
|
|
4
4
|
var utils_1 = require("./utils");
|
|
5
5
|
Object.defineProperty(exports, "append", { enumerable: true, get: function () { return utils_1.append; } });
|
|
6
6
|
Object.defineProperty(exports, "areEqual", { enumerable: true, get: function () { return utils_1.areEqual; } });
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "isDefinedAndNotNull", { enumerable: true, get: f
|
|
|
15
15
|
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return utils_1.isEmpty; } });
|
|
16
16
|
Object.defineProperty(exports, "isError", { enumerable: true, get: function () { return utils_1.isError; } });
|
|
17
17
|
Object.defineProperty(exports, "isFalse", { enumerable: true, get: function () { return utils_1.isFalse; } });
|
|
18
|
+
Object.defineProperty(exports, "isInteger", { enumerable: true, get: function () { return utils_1.isInteger; } });
|
|
18
19
|
Object.defineProperty(exports, "isNumber", { enumerable: true, get: function () { return utils_1.isNumber; } });
|
|
19
20
|
Object.defineProperty(exports, "isObject", { enumerable: true, get: function () { return utils_1.isObject; } });
|
|
20
21
|
Object.defineProperty(exports, "isRegExp", { enumerable: true, get: function () { return utils_1.isRegExp; } });
|
package/lib/utils.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare function isDefinedAndNotNull(value: any): boolean;
|
|
|
6
6
|
export declare function isError(value: any): value is Error;
|
|
7
7
|
export declare function isFalse(value: any): boolean;
|
|
8
8
|
export declare function isNumber(value: any): value is number;
|
|
9
|
+
export declare function isInteger(value: any): value is number;
|
|
9
10
|
export declare function isObject(value: any): value is Object;
|
|
10
11
|
export declare function isEmpty(document: any): boolean;
|
|
11
12
|
export declare function isRegExp(value: any): value is RegExp;
|
package/lib/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractAndRedact = exports.stringify = exports.clone = exports.redactUndefinedValues = exports.areEqual = exports.append = exports.hasProperty = exports.isUndefinedOrNull = exports.isUndefined = exports.isTrue = exports.isString = exports.isRegExp = exports.isEmpty = exports.isObject = exports.isNumber = exports.isFalse = exports.isError = exports.isDefinedAndNotNull = exports.isDefined = exports.isDate = exports.isBoolean = exports.isArray = void 0;
|
|
3
|
+
exports.extractAndRedact = exports.stringify = exports.clone = exports.redactUndefinedValues = exports.areEqual = exports.append = exports.hasProperty = exports.isUndefinedOrNull = exports.isUndefined = exports.isTrue = exports.isString = exports.isRegExp = exports.isEmpty = exports.isObject = exports.isInteger = exports.isNumber = exports.isFalse = exports.isError = exports.isDefinedAndNotNull = exports.isDefined = exports.isDate = exports.isBoolean = exports.isArray = void 0;
|
|
4
4
|
const deepEqual = require('deep-equal');
|
|
5
5
|
const clonedeep = require('lodash.clonedeep');
|
|
6
6
|
function isArray(value) {
|
|
@@ -36,6 +36,10 @@ function isNumber(value) {
|
|
|
36
36
|
return ((value !== null) && ((value !== undefined))) && (typeof value === 'number') && isFinite(value);
|
|
37
37
|
}
|
|
38
38
|
exports.isNumber = isNumber;
|
|
39
|
+
function isInteger(value) {
|
|
40
|
+
return isNumber(value) && (value % 1 === 0);
|
|
41
|
+
}
|
|
42
|
+
exports.isInteger = isInteger;
|
|
39
43
|
function isObject(value) {
|
|
40
44
|
return ((value !== null) && ((value !== undefined))) && (typeof value === 'object')
|
|
41
45
|
&& ((value.constructor === Object) || ((value instanceof Object) && (!isArray(value))));
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "API Games Limited",
|
|
4
4
|
"description": "API Games JSON Utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "21.1.4",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/jest": "26.0.24",
|
|
28
|
-
"@types/node": "14.
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "4.
|
|
30
|
-
"@typescript-eslint/parser": "4.
|
|
28
|
+
"@types/node": "14.18.0",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
30
|
+
"@typescript-eslint/parser": "4.33.0",
|
|
31
31
|
"eslint": "7.32.0",
|
|
32
32
|
"eslint-config-airbnb": "18.2.1",
|
|
33
|
-
"eslint-plugin-import": "2.
|
|
34
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
35
|
-
"eslint-plugin-react": "7.
|
|
36
|
-
"eslint-plugin-react-hooks": "4.
|
|
33
|
+
"eslint-plugin-import": "2.25.3",
|
|
34
|
+
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
35
|
+
"eslint-plugin-react": "7.27.1",
|
|
36
|
+
"eslint-plugin-react-hooks": "4.3.0",
|
|
37
37
|
"jest": "27.0.6",
|
|
38
38
|
"ts-jest": "27.0.4",
|
|
39
|
-
"typescript": "4.
|
|
39
|
+
"typescript": "4.5.2"
|
|
40
40
|
},
|
|
41
41
|
"eslintConfig": {},
|
|
42
42
|
"repository": {
|