dgeoutils 2.2.0 → 2.2.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/dist/utils.d.ts CHANGED
@@ -12,4 +12,5 @@ interface CheckFunction {
12
12
  checkArgument: (argName: string) => CheckArgument;
13
13
  }
14
14
  export declare const checkFunction: (funcName: string) => CheckFunction;
15
+ export declare const createArray: (v: number) => number[];
15
16
  export {};
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkFunction = exports.warn = void 0;
3
+ exports.createArray = exports.checkFunction = exports.warn = void 0;
4
4
  const index_1 = require("./index");
5
5
  const DPoint_1 = require("./DPoint");
6
6
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -21,7 +21,7 @@ const shouldBeInt = (scope, funcName, argName) => (p) => {
21
21
  };
22
22
  const shouldBeUInt = (scope, funcName, argName) => (p) => {
23
23
  if (!p.clone().round()
24
- .equal(p) || !p.gtOrEqual(DPoint_1.DPoint.Zero())) {
24
+ .equal(p) || !p.gtOrEqual(DPoint_1.DPoint.zero())) {
25
25
  (0, exports.warn)(`"${funcName}" -> "${argName}" should be UInt!`);
26
26
  }
27
27
  return scope;
@@ -66,3 +66,5 @@ const checkFunction = (funcName) => ({
66
66
  }
67
67
  });
68
68
  exports.checkFunction = checkFunction;
69
+ const createArray = (v) => new Array(v).fill(0);
70
+ exports.createArray = createArray;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dgeoutils",
3
- "version": "2.2.0",
3
+ "version": "2.2.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "node_modules/.bin/tsc",