@ot-builder/common-impl
Advanced tools
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.between = exports.nonzero = exports.zero = exports.unequal = exports.equal = void 0; | ||
| exports.equal = equal; | ||
| exports.unequal = unequal; | ||
| exports.zero = zero; | ||
| exports.nonzero = nonzero; | ||
| exports.between = between; | ||
| function equal(a, b, tolerance) { | ||
| return Math.abs(a - b) <= tolerance; | ||
| } | ||
| exports.equal = equal; | ||
| function unequal(a, b, tolerance) { | ||
| return Math.abs(a - b) > tolerance; | ||
| } | ||
| exports.unequal = unequal; | ||
| function zero(a, tolerance) { | ||
| return Math.abs(a) <= tolerance; | ||
| } | ||
| exports.zero = zero; | ||
| function nonzero(a, tolerance) { | ||
| return Math.abs(a) > tolerance; | ||
| } | ||
| exports.nonzero = nonzero; | ||
| function between(d1, dj, d2, tolerance) { | ||
| return Math.min(d1, d2) - tolerance <= dj && dj <= Math.max(d1, d2) + tolerance; | ||
| } | ||
| exports.between = between; | ||
| //# sourceMappingURL=approx.js.map |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.Round = exports.Approx = exports.rowCount = exports.d2 = exports.pmod = void 0; | ||
| exports.Round = exports.Approx = void 0; | ||
| exports.pmod = pmod; | ||
| exports.d2 = d2; | ||
| exports.rowCount = rowCount; | ||
| function pmod(j, n) { | ||
| return ((j % n) + n) % n; | ||
| } | ||
| exports.pmod = pmod; | ||
| function d2(columns, row, column) { | ||
| return row * columns + column; | ||
| } | ||
| exports.d2 = d2; | ||
| function rowCount(a, columns) { | ||
| return (a.length / columns) | 0; | ||
| } | ||
| exports.rowCount = rowCount; | ||
| // re-exports | ||
@@ -17,0 +17,0 @@ exports.Approx = require("./approx"); |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.Offset = exports.Coord = void 0; | ||
| exports.Coord = Coord; | ||
| exports.Offset = Offset; | ||
| function Coord(x) { | ||
| return Math.round(x); | ||
| } | ||
| exports.Coord = Coord; | ||
| function Offset(x) { | ||
| return Math.round(x); | ||
| } | ||
| exports.Offset = Offset; | ||
| //# sourceMappingURL=rounding.js.map |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.inPlaceShrinkArray = void 0; | ||
| exports.inPlaceShrinkArray = inPlaceShrinkArray; | ||
| function inPlaceShrinkArray(set, a) { | ||
@@ -13,3 +13,2 @@ let front = 0; | ||
| } | ||
| exports.inPlaceShrinkArray = inPlaceShrinkArray; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,3 +0,1 @@ | ||
| /// <reference types="node" /> | ||
| /// <reference types="node" /> | ||
| import * as Crypto from "crypto"; | ||
@@ -4,0 +2,0 @@ export declare abstract class HashRep { |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.Zip3WithIndex = exports.ZipWithIndexReverse = exports.ZipWithIndex = exports.Zip = exports.FlatMatrixAutoSize = exports.FlatMatrixSized = exports.ArrToCount = exports.ToCount = exports.Fallback = void 0; | ||
| exports.Fallback = Fallback; | ||
| exports.ToCount = ToCount; | ||
| exports.ArrToCount = ArrToCount; | ||
| exports.FlatMatrixSized = FlatMatrixSized; | ||
| exports.FlatMatrixAutoSize = FlatMatrixAutoSize; | ||
| exports.Zip = Zip; | ||
| exports.ZipWithIndex = ZipWithIndex; | ||
| exports.ZipWithIndexReverse = ZipWithIndexReverse; | ||
| exports.Zip3WithIndex = Zip3WithIndex; | ||
| function* Fallback(iter, fallback) { | ||
@@ -12,3 +20,2 @@ for (const x of iter) { | ||
| } | ||
| exports.Fallback = Fallback; | ||
| function* ToCount(iter, count, fallback) { | ||
@@ -29,7 +36,5 @@ let c = 0; | ||
| } | ||
| exports.ToCount = ToCount; | ||
| function ArrToCount(iter, fallback) { | ||
| return ToCount(iter, iter.length, fallback); | ||
| } | ||
| exports.ArrToCount = ArrToCount; | ||
| function* FlatMatrixSized(mat, columns, fallback) { | ||
@@ -48,3 +53,2 @@ var _a; | ||
| } | ||
| exports.FlatMatrixSized = FlatMatrixSized; | ||
| function FlatMatrixAutoSize(mat, fallback) { | ||
@@ -59,3 +63,2 @@ const rows = mat.length; | ||
| } | ||
| exports.FlatMatrixAutoSize = FlatMatrixAutoSize; | ||
| function* Zip(as, bs) { | ||
@@ -68,3 +71,2 @@ if (as.length !== bs.length) | ||
| } | ||
| exports.Zip = Zip; | ||
| function* ZipWithIndex(as, bs) { | ||
@@ -77,3 +79,2 @@ if (as.length !== bs.length) | ||
| } | ||
| exports.ZipWithIndex = ZipWithIndex; | ||
| function* ZipWithIndexReverse(as, bs) { | ||
@@ -86,3 +87,2 @@ if (as.length !== bs.length) | ||
| } | ||
| exports.ZipWithIndexReverse = ZipWithIndexReverse; | ||
| function* Zip3WithIndex(as, bs, cs) { | ||
@@ -97,3 +97,2 @@ if (as.length !== bs.length) | ||
| } | ||
| exports.Zip3WithIndex = Zip3WithIndex; | ||
| //# sourceMappingURL=index.js.map |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.fromList = exports.ListStore = exports.ListStoreFactoryWithDefault = exports.ListStoreFactory = void 0; | ||
| exports.ListStore = exports.ListStoreFactoryWithDefault = exports.ListStoreFactory = void 0; | ||
| exports.fromList = fromList; | ||
| // Default implementation | ||
@@ -89,3 +90,2 @@ class ListStoreFactory { | ||
| } | ||
| exports.fromList = fromList; | ||
| //# sourceMappingURL=index.js.map |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.Tie = void 0; | ||
| exports.Tie = Tie; | ||
| function Tie(a, v) { | ||
| return [a, v]; | ||
| } | ||
| exports.Tie = Tie; | ||
| //# sourceMappingURL=tuple.js.map |
+5
-5
| { | ||
| "name": "@ot-builder/common-impl", | ||
| "version": "1.7.3", | ||
| "version": "1.7.4", | ||
| "license": "MIT", | ||
@@ -26,9 +26,9 @@ "repository": { | ||
| "dependencies": { | ||
| "@ot-builder/prelude": "1.7.3", | ||
| "tslib": "^2.0.0" | ||
| "@ot-builder/prelude": "1.7.4", | ||
| "tslib": "^2.6.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/jest": "^29.5.5", | ||
| "jest": "^29.6.2" | ||
| "@types/jest": "^29.5.12", | ||
| "jest": "^29.7.0" | ||
| } | ||
| } |
26816
-1.95%830
-0.84%+ Added
- Removed
Updated
Updated