@apigames/json 21.1.0 → 22.1.0-dev.1

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 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": "21.1.0",
6
+ "version": "22.1.0-dev.1",
7
7
  "main": "lib/index.js",
8
8
  "types": "lib/index.d.ts",
9
9
  "scripts": {
@@ -11,6 +11,10 @@
11
11
  "unx:build": "rm -rf lib && tsc && jest && jest --config build.jest.config.js --coverage",
12
12
  "win:publish": "(if exist lib rmdir /s /q lib) && tsc && jest && jest --config build.jest.config.js && npm publish",
13
13
  "unx:publish": "rm -rf lib && tsc && jest && jest --config build.jest.config.js && npm publish",
14
+ "win:publish-beta": "(if exist lib rmdir /s /q lib) && tsc && jest && jest --config build.jest.config.js && npm publish --tag beta",
15
+ "unx:publish-beta": "rm -rf lib && tsc && jest && jest --config build.jest.config.js && npm publish --tag beta",
16
+ "win:publish-dev": "(if exist lib rmdir /s /q lib) && tsc && jest && jest --config build.jest.config.js && npm publish --tag dev",
17
+ "unx:publish-dev": "rm -rf lib && tsc && jest && jest --config build.jest.config.js && npm publish --tag dev",
14
18
  "win:upgrade-latest": "(if exist node_modules rmdir /s /q node_modules) && (if exist package-lock.json del /s /q package-lock.json) && ncu -u --target latest && npm install",
15
19
  "unx:upgrade-latest": "rm -rf node_modules && rm -f package-lock.json && ncu -u --target latest && npm install",
16
20
  "win:upgrade-minor": "(if exist node_modules rmdir /s /q node_modules) && (if exist package-lock.json del /s /q package-lock.json) && ncu -u --target minor && npm install",
@@ -25,18 +29,18 @@
25
29
  },
26
30
  "devDependencies": {
27
31
  "@types/jest": "26.0.24",
28
- "@types/node": "14.17.21",
32
+ "@types/node": "14.18.0",
29
33
  "@typescript-eslint/eslint-plugin": "4.33.0",
30
34
  "@typescript-eslint/parser": "4.33.0",
31
35
  "eslint": "7.32.0",
32
36
  "eslint-config-airbnb": "18.2.1",
33
- "eslint-plugin-import": "2.24.2",
34
- "eslint-plugin-jsx-a11y": "6.4.1",
35
- "eslint-plugin-react": "7.26.1",
36
- "eslint-plugin-react-hooks": "4.2.0",
37
+ "eslint-plugin-import": "2.25.3",
38
+ "eslint-plugin-jsx-a11y": "6.5.1",
39
+ "eslint-plugin-react": "7.27.1",
40
+ "eslint-plugin-react-hooks": "4.3.0",
37
41
  "jest": "27.0.6",
38
42
  "ts-jest": "27.0.4",
39
- "typescript": "4.4.3"
43
+ "typescript": "4.5.2"
40
44
  },
41
45
  "eslintConfig": {},
42
46
  "repository": {