@oliversalzburg/js-utils 0.0.58-dev.2 → 0.0.58-dev.21
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/{async.d.ts → async/async.d.ts} +1 -1
- package/{async.js → async/async.js} +1 -1
- package/async/async.js.map +1 -0
- package/async/async.test.js.map +1 -0
- package/data/array.d.ts +1 -0
- package/data/array.js +2 -1
- package/data/array.js.map +1 -1
- package/{nil.d.ts → data/nil.d.ts} +1 -1
- package/data/nil.js.map +1 -0
- package/{random.js → data/random.js} +1 -1
- package/data/random.js.map +1 -0
- package/data/string.js.map +1 -0
- package/device/shake.js +1 -1
- package/device/shake.js.map +1 -1
- package/dom/core.js +2 -2
- package/dom/core.js.map +1 -1
- package/errors/AbstractError.js.map +1 -0
- package/errors/InternalError.js.map +1 -0
- package/errors/InvalidArgumentError.js.map +1 -0
- package/errors/InvalidOperationError.js.map +1 -0
- package/errors/NotImplementedError.js.map +1 -0
- package/errors/PermissionViolationError.js.map +1 -0
- package/errors/ResourceConflictError.js.map +1 -0
- package/errors/UnknownError.js.map +1 -0
- package/errors/console.js.map +1 -0
- package/{error-serializer.d.ts → errors/error-serializer.d.ts} +1 -1
- package/{error-serializer.js → errors/error-serializer.js} +3 -3
- package/errors/error-serializer.js.map +1 -0
- package/errors/error-serializer.test.js.map +1 -0
- package/events/event.js.map +1 -0
- package/graphics/canvas-sandbox-mp.d.ts +1 -1
- package/graphics/canvas-sandbox-mp.js +2 -2
- package/graphics/canvas-sandbox-mp.js.map +1 -1
- package/graphics/canvas-sandbox.d.ts +1 -1
- package/graphics/canvas-sandbox.js +1 -2
- package/graphics/canvas-sandbox.js.map +1 -1
- package/graphics/canvas2d-headless.js +2 -2
- package/graphics/canvas2d-headless.js.map +1 -1
- package/graphics/canvas2d.js +2 -2
- package/graphics/canvas2d.js.map +1 -1
- package/graphics/canvas3d.js +2 -2
- package/graphics/canvas3d.js.map +1 -1
- package/graphics/palette-sampler.js +1 -1
- package/graphics/palette-sampler.js.map +1 -1
- package/graphics/palette.d.ts +1 -1
- package/graphics/palette.js +1 -1
- package/graphics/palette.js.map +1 -1
- package/graphics/shader.js +2 -2
- package/graphics/shader.js.map +1 -1
- package/log/report.js +2 -2
- package/log/report.js.map +1 -1
- package/{performance.d.ts → measurement/performance.d.ts} +1 -1
- package/measurement/performance.js.map +1 -0
- package/package.json +14 -19
- package/async.js.map +0 -1
- package/async.test.js +0 -28
- package/async.test.js.map +0 -1
- package/data/index.d.ts +0 -2
- package/data/index.js +0 -3
- package/data/index.js.map +0 -1
- package/device/index.d.ts +0 -1
- package/device/index.js +0 -2
- package/device/index.js.map +0 -1
- package/dom/index.d.ts +0 -1
- package/dom/index.js +0 -2
- package/dom/index.js.map +0 -1
- package/error/AbstractError.js.map +0 -1
- package/error/InternalError.js.map +0 -1
- package/error/InvalidArgumentError.js.map +0 -1
- package/error/InvalidOperationError.js.map +0 -1
- package/error/NotImplementedError.js.map +0 -1
- package/error/PermissionViolationError.js.map +0 -1
- package/error/ResourceConflictError.js.map +0 -1
- package/error/UnknownError.js.map +0 -1
- package/error/console.js.map +0 -1
- package/error/index.d.ts +0 -9
- package/error/index.js +0 -10
- package/error/index.js.map +0 -1
- package/error-serializer.js.map +0 -1
- package/error-serializer.test.js +0 -118
- package/error-serializer.test.js.map +0 -1
- package/event.js.map +0 -1
- package/format/bytes.test.js +0 -141
- package/format/count.test.js +0 -16
- package/format/index.d.ts +0 -4
- package/format/index.js +0 -5
- package/format/index.js.map +0 -1
- package/format/milliseconds.test.js +0 -343
- package/format/string.test.js +0 -17
- package/graphics/index.d.ts +0 -11
- package/graphics/index.js +0 -12
- package/graphics/index.js.map +0 -1
- package/index.d.ts +0 -16
- package/index.js +0 -17
- package/index.js.map +0 -1
- package/log/index.d.ts +0 -2
- package/log/index.js +0 -3
- package/log/index.js.map +0 -1
- package/math/index.d.ts +0 -9
- package/math/index.js +0 -10
- package/math/index.js.map +0 -1
- package/nil.js.map +0 -1
- package/performance.js.map +0 -1
- package/random.js.map +0 -1
- package/string.js.map +0 -1
- /package/{async.test.d.ts → async/async.test.d.ts} +0 -0
- /package/{nil.js → data/nil.js} +0 -0
- /package/{random.d.ts → data/random.d.ts} +0 -0
- /package/{string.d.ts → data/string.d.ts} +0 -0
- /package/{string.js → data/string.js} +0 -0
- /package/{error → errors}/AbstractError.d.ts +0 -0
- /package/{error → errors}/AbstractError.js +0 -0
- /package/{error → errors}/InternalError.d.ts +0 -0
- /package/{error → errors}/InternalError.js +0 -0
- /package/{error → errors}/InvalidArgumentError.d.ts +0 -0
- /package/{error → errors}/InvalidArgumentError.js +0 -0
- /package/{error → errors}/InvalidOperationError.d.ts +0 -0
- /package/{error → errors}/InvalidOperationError.js +0 -0
- /package/{error → errors}/NotImplementedError.d.ts +0 -0
- /package/{error → errors}/NotImplementedError.js +0 -0
- /package/{error → errors}/PermissionViolationError.d.ts +0 -0
- /package/{error → errors}/PermissionViolationError.js +0 -0
- /package/{error → errors}/ResourceConflictError.d.ts +0 -0
- /package/{error → errors}/ResourceConflictError.js +0 -0
- /package/{error → errors}/UnknownError.d.ts +0 -0
- /package/{error → errors}/UnknownError.js +0 -0
- /package/{error → errors}/console.d.ts +0 -0
- /package/{error → errors}/console.js +0 -0
- /package/{error-serializer.test.d.ts → errors/error-serializer.test.d.ts} +0 -0
- /package/{event.d.ts → events/event.d.ts} +0 -0
- /package/{event.js → events/event.js} +0 -0
- /package/{performance.js → measurement/performance.js} +0 -0
package/format/bytes.test.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
import { it } from "mocha";
|
|
3
|
-
import { formatBytes } from "./bytes.js";
|
|
4
|
-
it("throws on invalid input", () => {
|
|
5
|
-
expect(() => {
|
|
6
|
-
formatBytes("");
|
|
7
|
-
}).to.throw();
|
|
8
|
-
expect(() => {
|
|
9
|
-
formatBytes("1");
|
|
10
|
-
}).to.throw();
|
|
11
|
-
expect(() => {
|
|
12
|
-
formatBytes(Number.NaN);
|
|
13
|
-
}).to.throw();
|
|
14
|
-
expect(() => {
|
|
15
|
-
formatBytes(true);
|
|
16
|
-
}).to.throw();
|
|
17
|
-
expect(() => {
|
|
18
|
-
formatBytes(Number.POSITIVE_INFINITY);
|
|
19
|
-
}).to.throw();
|
|
20
|
-
expect(() => {
|
|
21
|
-
formatBytes(Number.NEGATIVE_INFINITY);
|
|
22
|
-
}).to.throw();
|
|
23
|
-
expect(() => {
|
|
24
|
-
formatBytes(null);
|
|
25
|
-
}).to.throw();
|
|
26
|
-
});
|
|
27
|
-
it("converts bytes to human readable strings", () => {
|
|
28
|
-
expect(formatBytes(0)).to.equal("0 B");
|
|
29
|
-
expect(formatBytes(0.4)).to.equal("0.4 B");
|
|
30
|
-
expect(formatBytes(0.7)).to.equal("0.7 B");
|
|
31
|
-
expect(formatBytes(10)).to.equal("10 B");
|
|
32
|
-
expect(formatBytes(10.1)).to.equal("10.1 B");
|
|
33
|
-
expect(formatBytes(999)).to.equal("999 B");
|
|
34
|
-
expect(formatBytes(1001)).to.equal("1 kB");
|
|
35
|
-
expect(formatBytes(1e16)).to.equal("10 PB");
|
|
36
|
-
expect(formatBytes(1e30)).to.equal("1000000 YB");
|
|
37
|
-
});
|
|
38
|
-
it("supports negative number", () => {
|
|
39
|
-
expect(formatBytes(-0.4)).to.equal("-0.4 B");
|
|
40
|
-
expect(formatBytes(-0.7)).to.equal("-0.7 B");
|
|
41
|
-
expect(formatBytes(-10.1)).to.equal("-10.1 B");
|
|
42
|
-
expect(formatBytes(-999)).to.equal("-999 B");
|
|
43
|
-
expect(formatBytes(-1001)).to.equal("-1 kB");
|
|
44
|
-
});
|
|
45
|
-
it("locale option", function () {
|
|
46
|
-
// Fails on NodeJS20 on Windows
|
|
47
|
-
// https://github.com/oliversalzburg/js-utils/actions/runs/9069549841/job/24919347525
|
|
48
|
-
this.timeout(30000);
|
|
49
|
-
expect(formatBytes(-0.4, { locale: "de" })).to.equal("-0,4 B");
|
|
50
|
-
expect(formatBytes(0.4, { locale: "de" })).to.equal("0,4 B");
|
|
51
|
-
expect(formatBytes(1001, { locale: "de" })).to.equal("1 kB");
|
|
52
|
-
expect(formatBytes(10.1, { locale: "de" })).to.equal("10,1 B");
|
|
53
|
-
expect(formatBytes(1e30, { locale: "de" })).to.equal("1.000.000 YB");
|
|
54
|
-
expect(formatBytes(-0.4, { locale: "en" })).to.equal("-0.4 B");
|
|
55
|
-
expect(formatBytes(0.4, { locale: "en" })).to.equal("0.4 B");
|
|
56
|
-
expect(formatBytes(1001, { locale: "en" })).to.equal("1 kB");
|
|
57
|
-
expect(formatBytes(10.1, { locale: "en" })).to.equal("10.1 B");
|
|
58
|
-
expect(formatBytes(1e30, { locale: "en" })).to.equal("1,000,000 YB");
|
|
59
|
-
expect(formatBytes(-0.4, { locale: ["unknown", "de", "en"] })).to.equal("-0,4 B");
|
|
60
|
-
expect(formatBytes(0.4, { locale: ["unknown", "de", "en"] })).to.equal("0,4 B");
|
|
61
|
-
expect(formatBytes(1001, { locale: ["unknown", "de", "en"] })).to.equal("1 kB");
|
|
62
|
-
expect(formatBytes(10.1, { locale: ["unknown", "de", "en"] })).to.equal("10,1 B");
|
|
63
|
-
expect(formatBytes(1e30, { locale: ["unknown", "de", "en"] })).to.equal("1.000.000 YB");
|
|
64
|
-
expect(formatBytes(-0.4, { locale: true })).to.equal("-0.4 B");
|
|
65
|
-
expect(formatBytes(0.4, { locale: true })).to.equal("0.4 B");
|
|
66
|
-
expect(formatBytes(1001, { locale: true })).to.equal("1 kB");
|
|
67
|
-
expect(formatBytes(10.1, { locale: true })).to.equal("10.1 B");
|
|
68
|
-
expect(formatBytes(1e30, { locale: true })).to.equal("1,000,000 YB");
|
|
69
|
-
expect(formatBytes(-0.4, { locale: false })).to.equal("-0.4 B");
|
|
70
|
-
expect(formatBytes(0.4, { locale: false })).to.equal("0.4 B");
|
|
71
|
-
expect(formatBytes(1001, { locale: false })).to.equal("1 kB");
|
|
72
|
-
expect(formatBytes(10.1, { locale: false })).to.equal("10.1 B");
|
|
73
|
-
expect(formatBytes(1e30, { locale: false })).to.equal("1000000 YB");
|
|
74
|
-
expect(formatBytes(-0.4, { locale: undefined })).to.equal("-0.4 B");
|
|
75
|
-
expect(formatBytes(0.4, { locale: undefined })).to.equal("0.4 B");
|
|
76
|
-
expect(formatBytes(1001, { locale: undefined })).to.equal("1 kB");
|
|
77
|
-
expect(formatBytes(10.1, { locale: undefined })).to.equal("10.1 B");
|
|
78
|
-
expect(formatBytes(1e30, { locale: undefined })).to.equal("1000000 YB");
|
|
79
|
-
});
|
|
80
|
-
it("signed option", () => {
|
|
81
|
-
expect(formatBytes(42, { signed: true })).to.equal("+42 B");
|
|
82
|
-
expect(formatBytes(-13, { signed: true })).to.equal("-13 B");
|
|
83
|
-
expect(formatBytes(0, { signed: true })).to.equal(" 0 B");
|
|
84
|
-
});
|
|
85
|
-
it("bits option", () => {
|
|
86
|
-
expect(formatBytes(0, { bits: true })).to.equal("0 b");
|
|
87
|
-
expect(formatBytes(0.4, { bits: true })).to.equal("0.4 b");
|
|
88
|
-
expect(formatBytes(0.7, { bits: true })).to.equal("0.7 b");
|
|
89
|
-
expect(formatBytes(10, { bits: true })).to.equal("10 b");
|
|
90
|
-
expect(formatBytes(10.1, { bits: true })).to.equal("10.1 b");
|
|
91
|
-
expect(formatBytes(999, { bits: true })).to.equal("999 b");
|
|
92
|
-
expect(formatBytes(1001, { bits: true })).to.equal("1 kbit");
|
|
93
|
-
expect(formatBytes(1001, { bits: true })).to.equal("1 kbit");
|
|
94
|
-
expect(formatBytes(1e16, { bits: true })).to.equal("10 Pbit");
|
|
95
|
-
expect(formatBytes(1e30, { bits: true })).to.equal("1000000 Ybit");
|
|
96
|
-
});
|
|
97
|
-
it("binary option", () => {
|
|
98
|
-
expect(formatBytes(0, { binary: true })).to.equal("0 B");
|
|
99
|
-
expect(formatBytes(4, { binary: true })).to.equal("4 B");
|
|
100
|
-
expect(formatBytes(10, { binary: true })).to.equal("10 B");
|
|
101
|
-
expect(formatBytes(10.1, { binary: true })).to.equal("10.1 B");
|
|
102
|
-
expect(formatBytes(999, { binary: true })).to.equal("999 B");
|
|
103
|
-
expect(formatBytes(1025, { binary: true })).to.equal("1 KiB");
|
|
104
|
-
expect(formatBytes(1001, { binary: true })).to.equal("1000 B");
|
|
105
|
-
expect(formatBytes(1e16, { binary: true })).to.equal("8.88 PiB");
|
|
106
|
-
expect(formatBytes(1e30, { binary: true })).to.equal("827000 YiB");
|
|
107
|
-
});
|
|
108
|
-
it("bits and binary option", () => {
|
|
109
|
-
expect(formatBytes(0, { bits: true, binary: true })).to.equal("0 b");
|
|
110
|
-
expect(formatBytes(4, { bits: true, binary: true })).to.equal("4 b");
|
|
111
|
-
expect(formatBytes(10, { bits: true, binary: true })).to.equal("10 b");
|
|
112
|
-
expect(formatBytes(999, { bits: true, binary: true })).to.equal("999 b");
|
|
113
|
-
expect(formatBytes(1025, { bits: true, binary: true })).to.equal("1 kibit");
|
|
114
|
-
expect(formatBytes(1e6, { bits: true, binary: true })).to.equal("977 kibit");
|
|
115
|
-
});
|
|
116
|
-
it("fractional digits options", () => {
|
|
117
|
-
expect(formatBytes(1900, { maximumFractionDigits: 1 })).to.equal("1.9 kB");
|
|
118
|
-
expect(formatBytes(1900, { minimumFractionDigits: 3 })).to.equal("1.900 kB");
|
|
119
|
-
expect(formatBytes(1911, { maximumFractionDigits: 1 })).to.equal("1.9 kB");
|
|
120
|
-
expect(formatBytes(1111, { maximumFractionDigits: 2 })).to.equal("1.11 kB");
|
|
121
|
-
expect(formatBytes(1019, { maximumFractionDigits: 3 })).to.equal("1.019 kB");
|
|
122
|
-
expect(formatBytes(1001, { maximumFractionDigits: 3 })).to.equal("1.001 kB");
|
|
123
|
-
expect(formatBytes(1000, { minimumFractionDigits: 1, maximumFractionDigits: 3 })).to.equal("1.0 kB");
|
|
124
|
-
expect(formatBytes(3942, { minimumFractionDigits: 1, maximumFractionDigits: 2 })).to.equal("3.94 kB");
|
|
125
|
-
expect(formatBytes(4001, { maximumFractionDigits: 3, binary: true })).to.equal("3.907 KiB");
|
|
126
|
-
expect(formatBytes(18_717, { maximumFractionDigits: 2, binary: true })).to.equal("18.28 KiB");
|
|
127
|
-
expect(formatBytes(18_717, { maximumFractionDigits: 4, binary: true })).to.equal("18.2783 KiB");
|
|
128
|
-
expect(formatBytes(32_768, { minimumFractionDigits: 2, maximumFractionDigits: 3, binary: true })).to.equal("32.00 KiB");
|
|
129
|
-
expect(formatBytes(65_536, { minimumFractionDigits: 1, maximumFractionDigits: 3, binary: true })).to.equal("64.0 KiB");
|
|
130
|
-
});
|
|
131
|
-
it("space option", () => {
|
|
132
|
-
expect(formatBytes(0)).to.equal("0 B");
|
|
133
|
-
expect(formatBytes(0, { space: false })).to.equal("0B");
|
|
134
|
-
expect(formatBytes(999)).to.equal("999 B");
|
|
135
|
-
expect(formatBytes(999, { space: false })).to.equal("999B");
|
|
136
|
-
expect(formatBytes(-13, { signed: true })).to.equal("-13 B");
|
|
137
|
-
expect(formatBytes(-13, { signed: true, space: false })).to.equal("-13B");
|
|
138
|
-
expect(formatBytes(42, { signed: true })).to.equal("+42 B");
|
|
139
|
-
expect(formatBytes(42, { signed: true, space: false })).to.equal("+42B");
|
|
140
|
-
});
|
|
141
|
-
//# sourceMappingURL=bytes.test.js.map
|
package/format/count.test.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
import { it } from "mocha";
|
|
3
|
-
import { formatCount } from "./count.js";
|
|
4
|
-
it("formats counts as expected", function () {
|
|
5
|
-
// Fails on NodeJS20 on Windows
|
|
6
|
-
// https://github.com/oliversalzburg/js-utils/actions/runs/9069549841/job/24919347525
|
|
7
|
-
this.timeout(5000);
|
|
8
|
-
expect(formatCount(-1)).to.equal("-1");
|
|
9
|
-
expect(formatCount(0)).to.equal("0");
|
|
10
|
-
expect(formatCount(1)).to.equal("1");
|
|
11
|
-
expect(formatCount(10)).to.equal("10");
|
|
12
|
-
expect(formatCount(100)).to.equal("100");
|
|
13
|
-
expect(formatCount(1000)).to.equal("1K");
|
|
14
|
-
expect(formatCount(1234)).to.equal("1.234K");
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=count.test.js.map
|
package/format/index.d.ts
DELETED
package/format/index.js
DELETED
package/format/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/format/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
import { it } from "mocha";
|
|
3
|
-
import { formatMilliseconds } from "./milliseconds.js";
|
|
4
|
-
const toBigInt = (milliseconds) => {
|
|
5
|
-
if (typeof milliseconds !== "number") {
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
8
|
-
try {
|
|
9
|
-
return BigInt(milliseconds);
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
function runTests({ title, defaultOptions, cases, }) {
|
|
16
|
-
it(title, () => {
|
|
17
|
-
const format = (milliseconds, options = {}) => formatMilliseconds(milliseconds, { ...defaultOptions, ...options });
|
|
18
|
-
for (const testCase of cases) {
|
|
19
|
-
const [milliseconds, options, expected] = testCase.length === 3 ? testCase : [testCase[0], undefined, testCase[1]];
|
|
20
|
-
expect(format(milliseconds, options)).to.equal(expected, `Number(${milliseconds.toString()})`);
|
|
21
|
-
const bigint = toBigInt(milliseconds);
|
|
22
|
-
if (typeof bigint === "bigint") {
|
|
23
|
-
expect(format(bigint, options)).to.equal(expected, `BigInt(${bigint.toString()}n)`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
runTests({
|
|
29
|
-
title: "prettify milliseconds",
|
|
30
|
-
cases: [
|
|
31
|
-
[0, "0ms"],
|
|
32
|
-
[0.1, "1ms"],
|
|
33
|
-
[1, "1ms"],
|
|
34
|
-
[999, "999ms"],
|
|
35
|
-
[1000, "1s"],
|
|
36
|
-
[1000 + 400, "1.4s"],
|
|
37
|
-
[1000 * 2 + 400, "2.4s"],
|
|
38
|
-
[1000 * 55, "55s"],
|
|
39
|
-
[1000 * 67, "1m 7s"],
|
|
40
|
-
[1000 * 60 * 5, "5m"],
|
|
41
|
-
[1000 * 60 * 67, "1h 7m"],
|
|
42
|
-
[1000 * 60 * 60 * 12, "12h"],
|
|
43
|
-
[1000 * 60 * 60 * 40, "1d 16h"],
|
|
44
|
-
[1000 * 60 * 60 * 999, "41d 15h"],
|
|
45
|
-
[1000 * 60 * 60 * 24 * 465, "1y 100d"],
|
|
46
|
-
[1000 * 60 * 67 * 24 * 465, "1y 154d 6h"],
|
|
47
|
-
[119_999, "1m 59.9s"],
|
|
48
|
-
[120_000, "2m"],
|
|
49
|
-
[Number.MAX_SAFE_INTEGER, "285616y 151d 8h 59m 0.9s"],
|
|
50
|
-
],
|
|
51
|
-
});
|
|
52
|
-
runTests({
|
|
53
|
-
title: "have a compact option",
|
|
54
|
-
defaultOptions: { compact: true },
|
|
55
|
-
cases: [
|
|
56
|
-
[1000 + 4, "1s"],
|
|
57
|
-
[1000 * 60 * 60 * 999, "41d"],
|
|
58
|
-
[1000 * 60 * 60 * 24 * 465, "1y"],
|
|
59
|
-
[1000 * 60 * 67 * 24 * 465, "1y"],
|
|
60
|
-
],
|
|
61
|
-
});
|
|
62
|
-
runTests({
|
|
63
|
-
title: "have a unitCount option",
|
|
64
|
-
cases: [
|
|
65
|
-
[1000 * 60, { unitCount: 0 }, "1m"],
|
|
66
|
-
[1000 * 60, { unitCount: 1 }, "1m"],
|
|
67
|
-
[1000 * 60 * 67, { unitCount: 1 }, "1h"],
|
|
68
|
-
[1000 * 60 * 67, { unitCount: 2 }, "1h 7m"],
|
|
69
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 1 }, "1y"],
|
|
70
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 2 }, "1y 154d"],
|
|
71
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 3 }, "1y 154d 6h"],
|
|
72
|
-
],
|
|
73
|
-
});
|
|
74
|
-
runTests({
|
|
75
|
-
title: "have a secondsDecimalDigits option",
|
|
76
|
-
cases: [
|
|
77
|
-
[10_000, "10s"],
|
|
78
|
-
[33_333, "33.3s"],
|
|
79
|
-
[999, { secondsDecimalDigits: 0 }, "999ms"],
|
|
80
|
-
[1000, { secondsDecimalDigits: 0 }, "1s"],
|
|
81
|
-
[1999, { secondsDecimalDigits: 0 }, "1s"],
|
|
82
|
-
[2000, { secondsDecimalDigits: 0 }, "2s"],
|
|
83
|
-
[33_333, { secondsDecimalDigits: 0 }, "33s"],
|
|
84
|
-
[33_333, { secondsDecimalDigits: 4 }, "33.3330s"],
|
|
85
|
-
],
|
|
86
|
-
});
|
|
87
|
-
runTests({
|
|
88
|
-
title: "have a millisecondsDecimalDigits option",
|
|
89
|
-
cases: [
|
|
90
|
-
[33.333, "33ms"],
|
|
91
|
-
[33.333, { millisecondsDecimalDigits: 0 }, "33ms"],
|
|
92
|
-
[33.333, { millisecondsDecimalDigits: 4 }, "33.3330ms"],
|
|
93
|
-
],
|
|
94
|
-
});
|
|
95
|
-
runTests({
|
|
96
|
-
title: "have a keepDecimalsOnWholeSeconds option",
|
|
97
|
-
defaultOptions: { keepDecimalsOnWholeSeconds: true },
|
|
98
|
-
cases: [
|
|
99
|
-
[1000 * 33, { secondsDecimalDigits: 2 }, "33.00s"],
|
|
100
|
-
[1000 * 33.000_04, { secondsDecimalDigits: 2 }, "33.00s"],
|
|
101
|
-
],
|
|
102
|
-
});
|
|
103
|
-
runTests({
|
|
104
|
-
title: "have a verbose option",
|
|
105
|
-
defaultOptions: { verbose: true },
|
|
106
|
-
cases: [
|
|
107
|
-
[0, "0 milliseconds"],
|
|
108
|
-
[0.1, "1 millisecond"],
|
|
109
|
-
[1, "1 millisecond"],
|
|
110
|
-
[1000, "1 second"],
|
|
111
|
-
[1000 + 400, "1.4 seconds"],
|
|
112
|
-
[1000 * 2 + 400, "2.4 seconds"],
|
|
113
|
-
[1000 * 5, "5 seconds"],
|
|
114
|
-
[1000 * 55, "55 seconds"],
|
|
115
|
-
[1000 * 67, "1 minute 7 seconds"],
|
|
116
|
-
[1000 * 60 * 5, "5 minutes"],
|
|
117
|
-
[1000 * 60 * 67, "1 hour 7 minutes"],
|
|
118
|
-
[1000 * 60 * 60 * 12, "12 hours"],
|
|
119
|
-
[1000 * 60 * 60 * 40, "1 day 16 hours"],
|
|
120
|
-
[1000 * 60 * 60 * 999, "41 days 15 hours"],
|
|
121
|
-
[1000 * 60 * 60 * 24 * 465, "1 year 100 days"],
|
|
122
|
-
[1000 * 60 * 67 * 24 * 465, "1 year 154 days 6 hours"],
|
|
123
|
-
],
|
|
124
|
-
});
|
|
125
|
-
runTests({
|
|
126
|
-
title: "have a separateMilliseconds option",
|
|
127
|
-
cases: [
|
|
128
|
-
[1100, { separateMilliseconds: false }, "1.1s"],
|
|
129
|
-
[1100, { separateMilliseconds: true }, "1s 100ms"],
|
|
130
|
-
],
|
|
131
|
-
});
|
|
132
|
-
runTests({
|
|
133
|
-
title: "have a formatSubMilliseconds option",
|
|
134
|
-
defaultOptions: { formatSubMilliseconds: true },
|
|
135
|
-
cases: [
|
|
136
|
-
[0.4, "400µs"],
|
|
137
|
-
[0.123_571, "123µs 571ns"],
|
|
138
|
-
[0.123_456_789, "123µs 456ns"],
|
|
139
|
-
[60 * 60 * 1000 + 23 * 1000 + 433 + 0.123_456, "1h 23s 433ms 123µs 456ns"],
|
|
140
|
-
],
|
|
141
|
-
});
|
|
142
|
-
runTests({
|
|
143
|
-
title: "work with verbose and compact options",
|
|
144
|
-
defaultOptions: { verbose: true, compact: true },
|
|
145
|
-
cases: [
|
|
146
|
-
[1000, "1 second"],
|
|
147
|
-
[1000 + 400, "1 second"],
|
|
148
|
-
[1000 * 2 + 400, "2 seconds"],
|
|
149
|
-
[1000 * 5, "5 seconds"],
|
|
150
|
-
[1000 * 55, "55 seconds"],
|
|
151
|
-
[1000 * 67, "1 minute"],
|
|
152
|
-
[1000 * 60 * 5, "5 minutes"],
|
|
153
|
-
[1000 * 60 * 67, "1 hour"],
|
|
154
|
-
[1000 * 60 * 60 * 12, "12 hours"],
|
|
155
|
-
[1000 * 60 * 60 * 40, "1 day"],
|
|
156
|
-
[1000 * 60 * 60 * 999, "41 days"],
|
|
157
|
-
[1000 * 60 * 60 * 24 * 465, "1 year"],
|
|
158
|
-
[1000 * 60 * 67 * 24 * 750, "2 years"],
|
|
159
|
-
],
|
|
160
|
-
});
|
|
161
|
-
runTests({
|
|
162
|
-
title: "work with verbose and unitCount options",
|
|
163
|
-
defaultOptions: { verbose: true },
|
|
164
|
-
cases: [
|
|
165
|
-
[1000 * 60, { unitCount: 1 }, "1 minute"],
|
|
166
|
-
[1000 * 60 * 67, { unitCount: 1 }, "1 hour"],
|
|
167
|
-
[1000 * 60 * 67, { unitCount: 2 }, "1 hour 7 minutes"],
|
|
168
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 1 }, "1 year"],
|
|
169
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 2 }, "1 year 154 days"],
|
|
170
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 3 }, "1 year 154 days 6 hours"],
|
|
171
|
-
],
|
|
172
|
-
});
|
|
173
|
-
runTests({
|
|
174
|
-
title: "work with verbose and secondsDecimalDigits options",
|
|
175
|
-
defaultOptions: { verbose: true, secondsDecimalDigits: 4 },
|
|
176
|
-
cases: [
|
|
177
|
-
[1000, "1 second"],
|
|
178
|
-
[1000 + 400, "1.4000 seconds"],
|
|
179
|
-
[1000 * 2 + 400, "2.4000 seconds"],
|
|
180
|
-
[1000 * 5 + 254, "5.2540 seconds"],
|
|
181
|
-
[33_333, "33.3330 seconds"],
|
|
182
|
-
],
|
|
183
|
-
});
|
|
184
|
-
runTests({
|
|
185
|
-
title: "work with verbose and millisecondsDecimalDigits options",
|
|
186
|
-
defaultOptions: { verbose: true, millisecondsDecimalDigits: 4 },
|
|
187
|
-
cases: [
|
|
188
|
-
[1, "1.0000 millisecond"],
|
|
189
|
-
[1 + 0.4, "1.4000 milliseconds"],
|
|
190
|
-
[1 * 2 + 0.4, "2.4000 milliseconds"],
|
|
191
|
-
[1 * 5 + 0.254, "5.2540 milliseconds"],
|
|
192
|
-
[33.333, "33.3330 milliseconds"],
|
|
193
|
-
],
|
|
194
|
-
});
|
|
195
|
-
runTests({
|
|
196
|
-
title: "work with verbose and formatSubMilliseconds options",
|
|
197
|
-
defaultOptions: { formatSubMilliseconds: true, verbose: true },
|
|
198
|
-
cases: [
|
|
199
|
-
[0.4, "400 microseconds"],
|
|
200
|
-
[0.123_571, "123 microseconds 571 nanoseconds"],
|
|
201
|
-
[0.123_456_789, "123 microseconds 456 nanoseconds"],
|
|
202
|
-
[0.001, "1 microsecond"],
|
|
203
|
-
],
|
|
204
|
-
});
|
|
205
|
-
runTests({
|
|
206
|
-
title: "compact option overrides unitCount option",
|
|
207
|
-
defaultOptions: { verbose: true, compact: true },
|
|
208
|
-
cases: [
|
|
209
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 1 }, "1 year"],
|
|
210
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 2 }, "1 year"],
|
|
211
|
-
[1000 * 60 * 67 * 24 * 465, { unitCount: 3 }, "1 year"],
|
|
212
|
-
],
|
|
213
|
-
});
|
|
214
|
-
runTests({
|
|
215
|
-
title: "work with separateMilliseconds and formatSubMilliseconds options",
|
|
216
|
-
defaultOptions: { separateMilliseconds: true, formatSubMilliseconds: true },
|
|
217
|
-
cases: [
|
|
218
|
-
[1010.340_067, "1s 10ms 340µs 67ns"],
|
|
219
|
-
[60 * 1000 + 34 + 0.000_005, "1m 34ms 5ns"],
|
|
220
|
-
],
|
|
221
|
-
});
|
|
222
|
-
it("throw on invalid", () => {
|
|
223
|
-
expect(() => {
|
|
224
|
-
formatMilliseconds("foo");
|
|
225
|
-
}).to.throw();
|
|
226
|
-
expect(() => {
|
|
227
|
-
formatMilliseconds(Number.NaN);
|
|
228
|
-
}).to.throw();
|
|
229
|
-
expect(() => {
|
|
230
|
-
formatMilliseconds(Number.POSITIVE_INFINITY);
|
|
231
|
-
}).to.throw();
|
|
232
|
-
});
|
|
233
|
-
runTests({
|
|
234
|
-
title: "properly rounds milliseconds with secondsDecimalDigits",
|
|
235
|
-
defaultOptions: { verbose: true, secondsDecimalDigits: 0 },
|
|
236
|
-
cases: [
|
|
237
|
-
[3 * 60 * 1000, "3 minutes"],
|
|
238
|
-
[3 * 60 * 1000 - 1, "2 minutes 59 seconds"],
|
|
239
|
-
[365 * 24 * 3600 * 1e3, "1 year"],
|
|
240
|
-
[365 * 24 * 3600 * 1e3 - 1, "364 days 23 hours 59 minutes 59 seconds"],
|
|
241
|
-
[24 * 3600 * 1e3, "1 day"],
|
|
242
|
-
[24 * 3600 * 1e3 - 1, "23 hours 59 minutes 59 seconds"],
|
|
243
|
-
[3600 * 1e3, "1 hour"],
|
|
244
|
-
[3600 * 1e3 - 1, "59 minutes 59 seconds"],
|
|
245
|
-
[2 * 3600 * 1e3, "2 hours"],
|
|
246
|
-
[2 * 3600 * 1e3 - 1, "1 hour 59 minutes 59 seconds"],
|
|
247
|
-
],
|
|
248
|
-
});
|
|
249
|
-
runTests({
|
|
250
|
-
title: "`colonNotation` option",
|
|
251
|
-
defaultOptions: { colonNotation: true },
|
|
252
|
-
cases: [
|
|
253
|
-
// Default formats
|
|
254
|
-
[1000, "0:01"],
|
|
255
|
-
[1543, "0:01.5"],
|
|
256
|
-
[1000 * 60, "1:00"],
|
|
257
|
-
[1000 * 90, "1:30"],
|
|
258
|
-
[95_543, "1:35.5"],
|
|
259
|
-
[1000 * 60 * 10 + 543, "10:00.5"],
|
|
260
|
-
[1000 * 60 * 59 + 1000 * 59 + 543, "59:59.5"],
|
|
261
|
-
[1000 * 60 * 60 * 15 + 1000 * 60 * 59 + 1000 * 59 + 543, "15:59:59.5"],
|
|
262
|
-
// Together with `secondsDecimalDigits`
|
|
263
|
-
[999, { secondsDecimalDigits: 0 }, "0:00"],
|
|
264
|
-
[999, { secondsDecimalDigits: 1 }, "0:00.9"],
|
|
265
|
-
[999, { secondsDecimalDigits: 2 }, "0:00.99"],
|
|
266
|
-
[999, { secondsDecimalDigits: 3 }, "0:00.999"],
|
|
267
|
-
[1000, { secondsDecimalDigits: 0 }, "0:01"],
|
|
268
|
-
[1000, { secondsDecimalDigits: 1 }, "0:01"],
|
|
269
|
-
[1000, { secondsDecimalDigits: 2 }, "0:01"],
|
|
270
|
-
[1000, { secondsDecimalDigits: 3 }, "0:01"],
|
|
271
|
-
[1001, { secondsDecimalDigits: 0 }, "0:01"],
|
|
272
|
-
[1001, { secondsDecimalDigits: 1 }, "0:01"],
|
|
273
|
-
[1001, { secondsDecimalDigits: 2 }, "0:01"],
|
|
274
|
-
[1001, { secondsDecimalDigits: 3 }, "0:01.001"],
|
|
275
|
-
[1543, { secondsDecimalDigits: 0 }, "0:01"],
|
|
276
|
-
[1543, { secondsDecimalDigits: 1 }, "0:01.5"],
|
|
277
|
-
[1543, { secondsDecimalDigits: 2 }, "0:01.54"],
|
|
278
|
-
[1543, { secondsDecimalDigits: 3 }, "0:01.543"],
|
|
279
|
-
[95_543, { secondsDecimalDigits: 0 }, "1:35"],
|
|
280
|
-
[95_543, { secondsDecimalDigits: 1 }, "1:35.5"],
|
|
281
|
-
[95_543, { secondsDecimalDigits: 2 }, "1:35.54"],
|
|
282
|
-
[95_543, { secondsDecimalDigits: 3 }, "1:35.543"],
|
|
283
|
-
[1000 * 60 * 10 + 543, { secondsDecimalDigits: 3 }, "10:00.543"],
|
|
284
|
-
[
|
|
285
|
-
1000 * 60 * 60 * 15 + 1000 * 60 * 59 + 1000 * 59 + 543,
|
|
286
|
-
{ secondsDecimalDigits: 3 },
|
|
287
|
-
"15:59:59.543",
|
|
288
|
-
],
|
|
289
|
-
// Together with `keepDecimalsOnWholeSeconds`
|
|
290
|
-
[999, { secondsDecimalDigits: 0, keepDecimalsOnWholeSeconds: true }, "0:00"],
|
|
291
|
-
[999, { secondsDecimalDigits: 1, keepDecimalsOnWholeSeconds: true }, "0:00.9"],
|
|
292
|
-
[999, { secondsDecimalDigits: 2, keepDecimalsOnWholeSeconds: true }, "0:00.99"],
|
|
293
|
-
[999, { secondsDecimalDigits: 3, keepDecimalsOnWholeSeconds: true }, "0:00.999"],
|
|
294
|
-
[1000, { keepDecimalsOnWholeSeconds: true }, "0:01.0"],
|
|
295
|
-
[1000, { secondsDecimalDigits: 0, keepDecimalsOnWholeSeconds: true }, "0:01"],
|
|
296
|
-
[1000, { secondsDecimalDigits: 1, keepDecimalsOnWholeSeconds: true }, "0:01.0"],
|
|
297
|
-
[1000, { secondsDecimalDigits: 3, keepDecimalsOnWholeSeconds: true }, "0:01.000"],
|
|
298
|
-
[1000 * 90, { keepDecimalsOnWholeSeconds: true }, "1:30.0"],
|
|
299
|
-
[1000 * 90, { secondsDecimalDigits: 3, keepDecimalsOnWholeSeconds: true }, "1:30.000"],
|
|
300
|
-
[1000 * 60 * 10, { secondsDecimalDigits: 3, keepDecimalsOnWholeSeconds: true }, "10:00.000"],
|
|
301
|
-
// Together with `unitCount`
|
|
302
|
-
[1000 * 90, { secondsDecimalDigits: 0, unitCount: 1 }, "1"],
|
|
303
|
-
[1000 * 90, { secondsDecimalDigits: 0, unitCount: 2 }, "1:30"],
|
|
304
|
-
[1000 * 60 * 90, { secondsDecimalDigits: 0, unitCount: 3 }, "1:30:00"],
|
|
305
|
-
[95_543, { secondsDecimalDigits: 1, unitCount: 1 }, "1"],
|
|
306
|
-
[95_543, { secondsDecimalDigits: 1, unitCount: 2 }, "1:35.5"],
|
|
307
|
-
[95_543 + 1000 * 60 * 60, { secondsDecimalDigits: 1, unitCount: 3 }, "1:01:35.5"],
|
|
308
|
-
// Make sure incompatible options fall back to `colonNotation`
|
|
309
|
-
[1000 * 60 * 59 + 1000 * 59 + 543, { formatSubMilliseconds: true }, "59:59.5"],
|
|
310
|
-
[1000 * 60 * 59 + 1000 * 59 + 543, { separateMilliseconds: true }, "59:59.5"],
|
|
311
|
-
[1000 * 60 * 59 + 1000 * 59 + 543, { verbose: true }, "59:59.5"],
|
|
312
|
-
[1000 * 60 * 59 + 1000 * 59 + 543, { compact: true }, "59:59.5"],
|
|
313
|
-
// Big numbers
|
|
314
|
-
[Number.MAX_SAFE_INTEGER, "285616:151:08:59:00.9"],
|
|
315
|
-
],
|
|
316
|
-
});
|
|
317
|
-
it("Big numbers", () => {
|
|
318
|
-
expect(formatMilliseconds(Number.MAX_VALUE)).to.equal("5700447535712568547083700427941645003808085225292279557374304680873482979681895890593452082909683139015032646149857723394516742095667500822861020052921074432454921864096959420926519725467567456931340929884912090099277441972878147362726992943838905852030073647982034630974035871792165820638724934142y 218d 8h 8m 48s");
|
|
319
|
-
expect(formatMilliseconds(BigInt(Number.MAX_VALUE))).to.equal("5700447535712568836077099940756733789893155997141203595856084373514626483384973958669126034778249561502424497511237394223564222694364034207523704550467323597984839883832803211448677387442583997465622415920063861691545637902816557209722493636863373550063350653353143175061459195234630260059944318435y 207d 22h 14m 18.3s");
|
|
320
|
-
const duration = 0n +
|
|
321
|
-
// 1ms
|
|
322
|
-
1n +
|
|
323
|
-
// 2s
|
|
324
|
-
2n * 1000n +
|
|
325
|
-
// 3m
|
|
326
|
-
3n * 1000n * 60n +
|
|
327
|
-
// 4h
|
|
328
|
-
4n * 1000n * 60n * 60n +
|
|
329
|
-
// Days
|
|
330
|
-
BigInt(Number.MAX_VALUE) * 1000n * 60n * 60n * 24n;
|
|
331
|
-
expect(formatMilliseconds(duration)).to.equal("492518667085565947437061434881381799446768678152999990681965689871663728164461750029012489404840762113809476584970910860915948840793052555530048073160376758865890165963154197469165726275039257381029776735493517650149543114803350542920023450224995474725473496449711570325310074468272054469179189112833218790y 18d 4h 3m 2s");
|
|
332
|
-
expect(formatMilliseconds(duration, { colonNotation: true })).to.equal("492518667085565947437061434881381799446768678152999990681965689871663728164461750029012489404840762113809476584970910860915948840793052555530048073160376758865890165963154197469165726275039257381029776735493517650149543114803350542920023450224995474725473496449711570325310074468272054469179189112833218790:18:04:03:02");
|
|
333
|
-
});
|
|
334
|
-
it("pure", () => {
|
|
335
|
-
const runTest = (options) => {
|
|
336
|
-
const copy = { ...options };
|
|
337
|
-
formatMilliseconds(1, options);
|
|
338
|
-
expect(options).to.deep.equal(copy);
|
|
339
|
-
};
|
|
340
|
-
runTest({ colonNotation: true });
|
|
341
|
-
runTest({ compact: true });
|
|
342
|
-
});
|
|
343
|
-
//# sourceMappingURL=milliseconds.test.js.map
|
package/format/string.test.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
import { it } from "mocha";
|
|
3
|
-
import { formatString, formatStringTemplate } from "./string.js";
|
|
4
|
-
it("formats index-based template strings", () => {
|
|
5
|
-
expect(formatString("'{0}'", "foo")).to.equal("'foo'");
|
|
6
|
-
expect(formatString("'{0}': {1}", "foo", "bar")).to.equal("'foo': bar");
|
|
7
|
-
expect(formatString("'{0}': {1}", "foo")).to.equal("'foo': {1}");
|
|
8
|
-
});
|
|
9
|
-
it("formats literal-based template strings", () => {
|
|
10
|
-
expect(formatStringTemplate("'#{foo}'", { foo: "foo" })).to.equal("'foo'");
|
|
11
|
-
expect(formatStringTemplate("'#{foo}': #{bar}", { foo: "foo", bar: "bar" })).to.equal("'foo': bar");
|
|
12
|
-
expect(formatStringTemplate("'#{foo}': #{bar}", { foo: "foo" })).to.equal("'foo': <missing parameter>");
|
|
13
|
-
});
|
|
14
|
-
it("treats empty string appropriately", () => {
|
|
15
|
-
expect(formatString("'{0}'", "")).to.equal("''");
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=string.test.js.map
|
package/graphics/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "./canvas-sandbox-mp.js";
|
|
2
|
-
export * from "./canvas-sandbox.js";
|
|
3
|
-
export * from "./canvas.js";
|
|
4
|
-
export * from "./canvas2d-headless.js";
|
|
5
|
-
export * from "./canvas2d.js";
|
|
6
|
-
export * from "./canvas3d.js";
|
|
7
|
-
export * from "./core.js";
|
|
8
|
-
export * from "./palette-sampler.js";
|
|
9
|
-
export * from "./palette.js";
|
|
10
|
-
export * from "./render-loop.js";
|
|
11
|
-
export * from "./shader.js";
|
package/graphics/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./canvas-sandbox-mp.js";
|
|
2
|
-
export * from "./canvas-sandbox.js";
|
|
3
|
-
export * from "./canvas.js";
|
|
4
|
-
export * from "./canvas2d-headless.js";
|
|
5
|
-
export * from "./canvas2d.js";
|
|
6
|
-
export * from "./canvas3d.js";
|
|
7
|
-
export * from "./core.js";
|
|
8
|
-
export * from "./palette-sampler.js";
|
|
9
|
-
export * from "./palette.js";
|
|
10
|
-
export * from "./render-loop.js";
|
|
11
|
-
export * from "./shader.js";
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/graphics/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/graphics/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"}
|
package/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from "./async.js";
|
|
2
|
-
export * from "./core.js";
|
|
3
|
-
export * from "./data/index.js";
|
|
4
|
-
export * from "./device/index.js";
|
|
5
|
-
export * from "./dom/index.js";
|
|
6
|
-
export * from "./error-serializer.js";
|
|
7
|
-
export * from "./error/index.js";
|
|
8
|
-
export * from "./event.js";
|
|
9
|
-
export * from "./format/index.js";
|
|
10
|
-
export * from "./graphics/index.js";
|
|
11
|
-
export * from "./log/index.js";
|
|
12
|
-
export * from "./math/index.js";
|
|
13
|
-
export * from "./nil.js";
|
|
14
|
-
export * from "./performance.js";
|
|
15
|
-
export * from "./random.js";
|
|
16
|
-
export * from "./string.js";
|
package/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from "./async.js";
|
|
2
|
-
export * from "./core.js";
|
|
3
|
-
export * from "./data/index.js";
|
|
4
|
-
export * from "./device/index.js";
|
|
5
|
-
export * from "./dom/index.js";
|
|
6
|
-
export * from "./error-serializer.js";
|
|
7
|
-
export * from "./error/index.js";
|
|
8
|
-
export * from "./event.js";
|
|
9
|
-
export * from "./format/index.js";
|
|
10
|
-
export * from "./graphics/index.js";
|
|
11
|
-
export * from "./log/index.js";
|
|
12
|
-
export * from "./math/index.js";
|
|
13
|
-
export * from "./nil.js";
|
|
14
|
-
export * from "./performance.js";
|
|
15
|
-
export * from "./random.js";
|
|
16
|
-
export * from "./string.js";
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/log/index.d.ts
DELETED
package/log/index.js
DELETED
package/log/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/log/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
package/math/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./core.js";
|
|
2
|
-
export * from "./easing.js";
|
|
3
|
-
export * from "./euler.js";
|
|
4
|
-
export * from "./matrix3.js";
|
|
5
|
-
export * from "./quaternion.js";
|
|
6
|
-
export * from "./transformation.js";
|
|
7
|
-
export * from "./vector2.js";
|
|
8
|
-
export * from "./vector3.js";
|
|
9
|
-
export * from "./vector4.js";
|
package/math/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./core.js";
|
|
2
|
-
export * from "./easing.js";
|
|
3
|
-
export * from "./euler.js";
|
|
4
|
-
export * from "./matrix3.js";
|
|
5
|
-
export * from "./quaternion.js";
|
|
6
|
-
export * from "./transformation.js";
|
|
7
|
-
export * from "./vector2.js";
|
|
8
|
-
export * from "./vector3.js";
|
|
9
|
-
export * from "./vector4.js";
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/math/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
package/nil.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nil.js","sourceRoot":"","sources":["../source/nil.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAW,OAAwB;IACtD,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AACnD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,EAAE,CAChB,OAAwB,EACxB,SAAkC;IAElC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,YAAY,SAAS,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C;;;OAGG;IACH,YAAY,OAAO,GAAG,sBAAsB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAW,OAAwB,EAAE,YAAqB;IACjF,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QACnB,MAAM,IAAI,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,QAAgC,EAChC,YAAqB;IAErB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACnB,MAAM,IAAI,kBAAkB,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,QAA2B,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAW,OAAwB;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QACnB,MAAM,IAAI,kBAAkB,EAAE,CAAC;IACjC,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAgC;IAEhC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACnB,MAAM,IAAI,kBAAkB,EAAE,CAAC;QACjC,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAI,OAAiB,EAAE,EAAK;IAClD,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAI,QAAyB,EAAE,EAAa;IACvE,MAAM,MAAM,GAAG,IAAI,KAAK,EAAK,CAAC;IAC9B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;aAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAI,OAAiB;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/performance.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../source/performance.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAU,OAAsC,EAAqB,EAAE;IAC5F,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAChC,OAAO,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,OAA2C,EACf,EAAE;IAC9B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAChC,OAAO,CAAC,MAAM,OAAO,EAAE,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC"}
|