@sinclair/typebox 0.25.24 → 0.25.25

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.
Files changed (61) hide show
  1. package/compiler/compiler.d.ts +25 -28
  2. package/compiler/compiler.js +495 -498
  3. package/compiler/index.d.ts +2 -2
  4. package/compiler/index.js +47 -47
  5. package/conditional/conditional.d.ts +17 -17
  6. package/conditional/conditional.js +91 -91
  7. package/conditional/index.d.ts +2 -2
  8. package/conditional/index.js +45 -45
  9. package/conditional/structural.d.ts +11 -11
  10. package/conditional/structural.js +685 -685
  11. package/custom/custom.d.ts +12 -12
  12. package/custom/custom.js +55 -55
  13. package/custom/index.d.ts +1 -1
  14. package/custom/index.js +44 -44
  15. package/errors/errors.d.ts +67 -67
  16. package/errors/errors.js +472 -472
  17. package/errors/index.d.ts +1 -1
  18. package/errors/index.js +44 -44
  19. package/format/format.d.ts +12 -12
  20. package/format/format.js +55 -55
  21. package/format/index.d.ts +1 -1
  22. package/format/index.js +44 -44
  23. package/guard/extends.d.ts +10 -10
  24. package/guard/extends.js +50 -50
  25. package/guard/guard.d.ts +60 -60
  26. package/guard/guard.js +440 -440
  27. package/guard/index.d.ts +2 -2
  28. package/guard/index.js +45 -45
  29. package/hash/hash.d.ts +8 -8
  30. package/hash/hash.js +183 -183
  31. package/hash/index.d.ts +1 -1
  32. package/hash/index.js +44 -44
  33. package/license +22 -22
  34. package/package.json +55 -52
  35. package/readme.md +1237 -1237
  36. package/system/index.d.ts +1 -1
  37. package/system/index.js +44 -44
  38. package/system/system.d.ts +17 -17
  39. package/system/system.js +69 -69
  40. package/typebox.d.ts +422 -422
  41. package/typebox.js +388 -388
  42. package/value/cast.d.ts +26 -26
  43. package/value/cast.js +415 -415
  44. package/value/check.d.ts +8 -8
  45. package/value/check.js +405 -405
  46. package/value/clone.d.ts +3 -3
  47. package/value/clone.js +71 -71
  48. package/value/create.d.ts +14 -14
  49. package/value/create.js +378 -378
  50. package/value/delta.d.ts +43 -43
  51. package/value/delta.js +204 -204
  52. package/value/equal.d.ts +3 -3
  53. package/value/equal.js +80 -80
  54. package/value/index.d.ts +4 -4
  55. package/value/index.js +53 -53
  56. package/value/is.d.ts +11 -11
  57. package/value/is.js +53 -53
  58. package/value/pointer.d.ts +24 -24
  59. package/value/pointer.js +142 -142
  60. package/value/value.d.ts +32 -32
  61. package/value/value.js +87 -87
package/guard/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './guard';
2
- export * from './extends';
1
+ export * from './guard';
2
+ export * from './extends';
package/guard/index.js CHANGED
@@ -1,45 +1,45 @@
1
- "use strict";
2
- /*--------------------------------------------------------------------------
3
-
4
- @sinclair/typebox/guards
5
-
6
- The MIT License (MIT)
7
-
8
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in
18
- all copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
- THE SOFTWARE.
27
-
28
- ---------------------------------------------------------------------------*/
29
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- var desc = Object.getOwnPropertyDescriptor(m, k);
32
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33
- desc = { enumerable: true, get: function() { return m[k]; } };
34
- }
35
- Object.defineProperty(o, k2, desc);
36
- }) : (function(o, m, k, k2) {
37
- if (k2 === undefined) k2 = k;
38
- o[k2] = m[k];
39
- }));
40
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- __exportStar(require("./guard"), exports);
45
- __exportStar(require("./extends"), exports);
1
+ "use strict";
2
+ /*--------------------------------------------------------------------------
3
+
4
+ @sinclair/typebox/guards
5
+
6
+ The MIT License (MIT)
7
+
8
+ Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+ ---------------------------------------------------------------------------*/
29
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ var desc = Object.getOwnPropertyDescriptor(m, k);
32
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33
+ desc = { enumerable: true, get: function() { return m[k]; } };
34
+ }
35
+ Object.defineProperty(o, k2, desc);
36
+ }) : (function(o, m, k, k2) {
37
+ if (k2 === undefined) k2 = k;
38
+ o[k2] = m[k];
39
+ }));
40
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ __exportStar(require("./guard"), exports);
45
+ __exportStar(require("./extends"), exports);
package/hash/hash.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export declare class ValueHashError extends Error {
2
- readonly value: unknown;
3
- constructor(value: unknown);
4
- }
5
- export declare namespace ValueHash {
6
- /** Creates a FNV1A-64 non cryptographic hash of the given value */
7
- function Create(value: unknown): bigint;
8
- }
1
+ export declare class ValueHashError extends Error {
2
+ readonly value: unknown;
3
+ constructor(value: unknown);
4
+ }
5
+ export declare namespace ValueHash {
6
+ /** Creates a FNV1A-64 non cryptographic hash of the given value */
7
+ function Create(value: unknown): bigint;
8
+ }
package/hash/hash.js CHANGED
@@ -1,183 +1,183 @@
1
- "use strict";
2
- /*--------------------------------------------------------------------------
3
-
4
- @sinclair/typebox/hash
5
-
6
- The MIT License (MIT)
7
-
8
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in
18
- all copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
- THE SOFTWARE.
27
-
28
- ---------------------------------------------------------------------------*/
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.ValueHash = exports.ValueHashError = void 0;
31
- class ValueHashError extends Error {
32
- constructor(value) {
33
- super(`Hash: Unable to hash value`);
34
- this.value = value;
35
- }
36
- }
37
- exports.ValueHashError = ValueHashError;
38
- var ValueHash;
39
- (function (ValueHash) {
40
- let ByteMarker;
41
- (function (ByteMarker) {
42
- ByteMarker[ByteMarker["Undefined"] = 0] = "Undefined";
43
- ByteMarker[ByteMarker["Null"] = 1] = "Null";
44
- ByteMarker[ByteMarker["Boolean"] = 2] = "Boolean";
45
- ByteMarker[ByteMarker["Number"] = 3] = "Number";
46
- ByteMarker[ByteMarker["String"] = 4] = "String";
47
- ByteMarker[ByteMarker["Object"] = 5] = "Object";
48
- ByteMarker[ByteMarker["Array"] = 6] = "Array";
49
- ByteMarker[ByteMarker["Date"] = 7] = "Date";
50
- ByteMarker[ByteMarker["Uint8Array"] = 8] = "Uint8Array";
51
- })(ByteMarker || (ByteMarker = {}));
52
- // ----------------------------------------------------
53
- // State
54
- // ----------------------------------------------------
55
- let Hash = globalThis.BigInt('14695981039346656037');
56
- const [Prime, Size] = [globalThis.BigInt('1099511628211'), globalThis.BigInt('2') ** globalThis.BigInt('64')];
57
- const Bytes = globalThis.Array.from({ length: 256 }).map((_, i) => globalThis.BigInt(i));
58
- const F64 = new globalThis.Float64Array(1);
59
- const F64In = new globalThis.DataView(F64.buffer);
60
- const F64Out = new globalThis.Uint8Array(F64.buffer);
61
- // ----------------------------------------------------
62
- // Guards
63
- // ----------------------------------------------------
64
- function IsDate(value) {
65
- return value instanceof globalThis.Date;
66
- }
67
- function IsUint8Array(value) {
68
- return value instanceof globalThis.Uint8Array;
69
- }
70
- function IsArray(value) {
71
- return globalThis.Array.isArray(value);
72
- }
73
- function IsBoolean(value) {
74
- return typeof value === 'boolean';
75
- }
76
- function IsNull(value) {
77
- return value === null;
78
- }
79
- function IsNumber(value) {
80
- return typeof value === 'number';
81
- }
82
- function IsObject(value) {
83
- return typeof value === 'object' && value !== null && !IsArray(value) && !IsDate(value) && !IsUint8Array(value);
84
- }
85
- function IsString(value) {
86
- return typeof value === 'string';
87
- }
88
- function IsUndefined(value) {
89
- return value === undefined;
90
- }
91
- // ----------------------------------------------------
92
- // Encoding
93
- // ----------------------------------------------------
94
- function Array(value) {
95
- Fnv1A64(ByteMarker.Array);
96
- for (const item of value) {
97
- Visit(item);
98
- }
99
- }
100
- function Boolean(value) {
101
- Fnv1A64(ByteMarker.Boolean);
102
- Fnv1A64(value ? 1 : 0);
103
- }
104
- function Date(value) {
105
- Fnv1A64(ByteMarker.Date);
106
- Visit(value.getTime());
107
- }
108
- function Null(value) {
109
- Fnv1A64(ByteMarker.Null);
110
- }
111
- function Number(value) {
112
- Fnv1A64(ByteMarker.Number);
113
- F64In.setFloat64(0, value);
114
- for (const byte of F64Out) {
115
- Fnv1A64(byte);
116
- }
117
- }
118
- function Object(value) {
119
- Fnv1A64(ByteMarker.Object);
120
- for (const key of globalThis.Object.keys(value).sort()) {
121
- Visit(key);
122
- Visit(value[key]);
123
- }
124
- }
125
- function String(value) {
126
- Fnv1A64(ByteMarker.String);
127
- for (let i = 0; i < value.length; i++) {
128
- Fnv1A64(value.charCodeAt(i));
129
- }
130
- }
131
- function Uint8Array(value) {
132
- Fnv1A64(ByteMarker.Uint8Array);
133
- for (let i = 0; i < value.length; i++) {
134
- Fnv1A64(value[i]);
135
- }
136
- }
137
- function Undefined(value) {
138
- return Fnv1A64(ByteMarker.Undefined);
139
- }
140
- function Visit(value) {
141
- if (IsArray(value)) {
142
- Array(value);
143
- }
144
- else if (IsBoolean(value)) {
145
- Boolean(value);
146
- }
147
- else if (IsDate(value)) {
148
- Date(value);
149
- }
150
- else if (IsNull(value)) {
151
- Null(value);
152
- }
153
- else if (IsNumber(value)) {
154
- Number(value);
155
- }
156
- else if (IsObject(value)) {
157
- Object(value);
158
- }
159
- else if (IsString(value)) {
160
- String(value);
161
- }
162
- else if (IsUint8Array(value)) {
163
- Uint8Array(value);
164
- }
165
- else if (IsUndefined(value)) {
166
- Undefined(value);
167
- }
168
- else {
169
- throw new ValueHashError(value);
170
- }
171
- }
172
- function Fnv1A64(byte) {
173
- Hash = Hash ^ Bytes[byte];
174
- Hash = (Hash * Prime) % Size;
175
- }
176
- /** Creates a FNV1A-64 non cryptographic hash of the given value */
177
- function Create(value) {
178
- Hash = globalThis.BigInt('14695981039346656037');
179
- Visit(value);
180
- return Hash;
181
- }
182
- ValueHash.Create = Create;
183
- })(ValueHash = exports.ValueHash || (exports.ValueHash = {}));
1
+ "use strict";
2
+ /*--------------------------------------------------------------------------
3
+
4
+ @sinclair/typebox/hash
5
+
6
+ The MIT License (MIT)
7
+
8
+ Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+ ---------------------------------------------------------------------------*/
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.ValueHash = exports.ValueHashError = void 0;
31
+ class ValueHashError extends Error {
32
+ constructor(value) {
33
+ super(`Hash: Unable to hash value`);
34
+ this.value = value;
35
+ }
36
+ }
37
+ exports.ValueHashError = ValueHashError;
38
+ var ValueHash;
39
+ (function (ValueHash) {
40
+ let ByteMarker;
41
+ (function (ByteMarker) {
42
+ ByteMarker[ByteMarker["Undefined"] = 0] = "Undefined";
43
+ ByteMarker[ByteMarker["Null"] = 1] = "Null";
44
+ ByteMarker[ByteMarker["Boolean"] = 2] = "Boolean";
45
+ ByteMarker[ByteMarker["Number"] = 3] = "Number";
46
+ ByteMarker[ByteMarker["String"] = 4] = "String";
47
+ ByteMarker[ByteMarker["Object"] = 5] = "Object";
48
+ ByteMarker[ByteMarker["Array"] = 6] = "Array";
49
+ ByteMarker[ByteMarker["Date"] = 7] = "Date";
50
+ ByteMarker[ByteMarker["Uint8Array"] = 8] = "Uint8Array";
51
+ })(ByteMarker || (ByteMarker = {}));
52
+ // ----------------------------------------------------
53
+ // State
54
+ // ----------------------------------------------------
55
+ let Hash = globalThis.BigInt('14695981039346656037');
56
+ const [Prime, Size] = [globalThis.BigInt('1099511628211'), globalThis.BigInt('2') ** globalThis.BigInt('64')];
57
+ const Bytes = globalThis.Array.from({ length: 256 }).map((_, i) => globalThis.BigInt(i));
58
+ const F64 = new globalThis.Float64Array(1);
59
+ const F64In = new globalThis.DataView(F64.buffer);
60
+ const F64Out = new globalThis.Uint8Array(F64.buffer);
61
+ // ----------------------------------------------------
62
+ // Guards
63
+ // ----------------------------------------------------
64
+ function IsDate(value) {
65
+ return value instanceof globalThis.Date;
66
+ }
67
+ function IsUint8Array(value) {
68
+ return value instanceof globalThis.Uint8Array;
69
+ }
70
+ function IsArray(value) {
71
+ return globalThis.Array.isArray(value);
72
+ }
73
+ function IsBoolean(value) {
74
+ return typeof value === 'boolean';
75
+ }
76
+ function IsNull(value) {
77
+ return value === null;
78
+ }
79
+ function IsNumber(value) {
80
+ return typeof value === 'number';
81
+ }
82
+ function IsObject(value) {
83
+ return typeof value === 'object' && value !== null && !IsArray(value) && !IsDate(value) && !IsUint8Array(value);
84
+ }
85
+ function IsString(value) {
86
+ return typeof value === 'string';
87
+ }
88
+ function IsUndefined(value) {
89
+ return value === undefined;
90
+ }
91
+ // ----------------------------------------------------
92
+ // Encoding
93
+ // ----------------------------------------------------
94
+ function Array(value) {
95
+ Fnv1A64(ByteMarker.Array);
96
+ for (const item of value) {
97
+ Visit(item);
98
+ }
99
+ }
100
+ function Boolean(value) {
101
+ Fnv1A64(ByteMarker.Boolean);
102
+ Fnv1A64(value ? 1 : 0);
103
+ }
104
+ function Date(value) {
105
+ Fnv1A64(ByteMarker.Date);
106
+ Visit(value.getTime());
107
+ }
108
+ function Null(value) {
109
+ Fnv1A64(ByteMarker.Null);
110
+ }
111
+ function Number(value) {
112
+ Fnv1A64(ByteMarker.Number);
113
+ F64In.setFloat64(0, value);
114
+ for (const byte of F64Out) {
115
+ Fnv1A64(byte);
116
+ }
117
+ }
118
+ function Object(value) {
119
+ Fnv1A64(ByteMarker.Object);
120
+ for (const key of globalThis.Object.keys(value).sort()) {
121
+ Visit(key);
122
+ Visit(value[key]);
123
+ }
124
+ }
125
+ function String(value) {
126
+ Fnv1A64(ByteMarker.String);
127
+ for (let i = 0; i < value.length; i++) {
128
+ Fnv1A64(value.charCodeAt(i));
129
+ }
130
+ }
131
+ function Uint8Array(value) {
132
+ Fnv1A64(ByteMarker.Uint8Array);
133
+ for (let i = 0; i < value.length; i++) {
134
+ Fnv1A64(value[i]);
135
+ }
136
+ }
137
+ function Undefined(value) {
138
+ return Fnv1A64(ByteMarker.Undefined);
139
+ }
140
+ function Visit(value) {
141
+ if (IsArray(value)) {
142
+ Array(value);
143
+ }
144
+ else if (IsBoolean(value)) {
145
+ Boolean(value);
146
+ }
147
+ else if (IsDate(value)) {
148
+ Date(value);
149
+ }
150
+ else if (IsNull(value)) {
151
+ Null(value);
152
+ }
153
+ else if (IsNumber(value)) {
154
+ Number(value);
155
+ }
156
+ else if (IsObject(value)) {
157
+ Object(value);
158
+ }
159
+ else if (IsString(value)) {
160
+ String(value);
161
+ }
162
+ else if (IsUint8Array(value)) {
163
+ Uint8Array(value);
164
+ }
165
+ else if (IsUndefined(value)) {
166
+ Undefined(value);
167
+ }
168
+ else {
169
+ throw new ValueHashError(value);
170
+ }
171
+ }
172
+ function Fnv1A64(byte) {
173
+ Hash = Hash ^ Bytes[byte];
174
+ Hash = (Hash * Prime) % Size;
175
+ }
176
+ /** Creates a FNV1A-64 non cryptographic hash of the given value */
177
+ function Create(value) {
178
+ Hash = globalThis.BigInt('14695981039346656037');
179
+ Visit(value);
180
+ return Hash;
181
+ }
182
+ ValueHash.Create = Create;
183
+ })(ValueHash = exports.ValueHash || (exports.ValueHash = {}));
package/hash/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './hash';
1
+ export * from './hash';
package/hash/index.js CHANGED
@@ -1,44 +1,44 @@
1
- "use strict";
2
- /*--------------------------------------------------------------------------
3
-
4
- @sinclair/typebox/hash
5
-
6
- The MIT License (MIT)
7
-
8
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in
18
- all copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
- THE SOFTWARE.
27
-
28
- ---------------------------------------------------------------------------*/
29
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- var desc = Object.getOwnPropertyDescriptor(m, k);
32
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33
- desc = { enumerable: true, get: function() { return m[k]; } };
34
- }
35
- Object.defineProperty(o, k2, desc);
36
- }) : (function(o, m, k, k2) {
37
- if (k2 === undefined) k2 = k;
38
- o[k2] = m[k];
39
- }));
40
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- __exportStar(require("./hash"), exports);
1
+ "use strict";
2
+ /*--------------------------------------------------------------------------
3
+
4
+ @sinclair/typebox/hash
5
+
6
+ The MIT License (MIT)
7
+
8
+ Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+ ---------------------------------------------------------------------------*/
29
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ var desc = Object.getOwnPropertyDescriptor(m, k);
32
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33
+ desc = { enumerable: true, get: function() { return m[k]; } };
34
+ }
35
+ Object.defineProperty(o, k2, desc);
36
+ }) : (function(o, m, k, k2) {
37
+ if (k2 === undefined) k2 = k;
38
+ o[k2] = m[k];
39
+ }));
40
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ __exportStar(require("./hash"), exports);
package/license CHANGED
@@ -1,23 +1,23 @@
1
- TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript
2
-
3
- The MIT License (MIT)
4
-
5
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1
+ TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
23
  THE SOFTWARE.