@valkyriestudios/utils 12.46.0 → 12.48.0

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/esm/deep/set.js CHANGED
@@ -5,46 +5,83 @@ function deepSet(obj, path, value, define = false) {
5
5
  throw new TypeError('Deepset is only supported for objects');
6
6
  if (typeof path !== 'string')
7
7
  throw new TypeError('No path was given');
8
- if (RGX_MALICIOUS.test(path))
9
- throw new TypeError('Malicious path provided');
10
- const path_s = path.trim();
11
- if (!path_s.length)
8
+ if (path.trim().length === 0) {
12
9
  throw new TypeError('No path was given');
13
- const parts = path_s
14
- .replace(/\[/g, '.')
15
- .replace(/(\.){2,}/g, '.')
16
- .replace(/(^\.|\.$|\])/g, '')
17
- .split('.');
18
- const last_part_ix = parts.length - 1;
19
- for (let i = 0; i < last_part_ix; i++) {
20
- if (Array.isArray(obj)) {
21
- const idx = parseInt(parts[i]);
22
- if (!Number.isInteger(idx) || idx < 0)
23
- throw new TypeError('Invalid path provided');
24
- if (!obj[idx])
25
- obj[idx] = {};
26
- obj = obj[idx];
27
- }
28
- else {
29
- if (!obj[parts[i]])
30
- obj[parts[i]] = {};
31
- obj = obj[parts[i]];
32
- }
33
10
  }
34
- if (!Array.isArray(obj) && Object.prototype.toString.call(obj) !== '[object Object]')
35
- return false;
36
- if (define) {
37
- Object.defineProperty(obj, parts[last_part_ix], value);
38
- }
39
- else if (Array.isArray(obj)) {
40
- const idx = parseInt(parts[last_part_ix]);
41
- if (!Number.isInteger(idx) || idx < 0)
42
- throw new TypeError('Invalid path provided');
43
- obj[idx] = value;
11
+ if (RGX_MALICIOUS.test(path)) {
12
+ throw new TypeError('Malicious path provided');
44
13
  }
45
- else {
46
- obj[parts[last_part_ix]] = value;
14
+ let cursor = obj;
15
+ let keyStart = 0;
16
+ const len = path.length;
17
+ for (let i = 0; i <= len; i++) {
18
+ const code = i === len ? 46 : path.charCodeAt(i);
19
+ if (code === 46 || code === 91 || code === 93) {
20
+ if (i === keyStart) {
21
+ keyStart = i + 1;
22
+ continue;
23
+ }
24
+ const key = path.substring(keyStart, i);
25
+ keyStart = i + 1;
26
+ let isEnd = i === len;
27
+ if (!isEnd) {
28
+ let j = i + 1;
29
+ isEnd = true;
30
+ for (; j < len; j++) {
31
+ const c = path.charCodeAt(j);
32
+ if (c !== 46 && c !== 91 && c !== 93) {
33
+ isEnd = false;
34
+ break;
35
+ }
36
+ }
37
+ }
38
+ if (isEnd) {
39
+ if (Array.isArray(cursor)) {
40
+ const idx = +key;
41
+ if (idx !== idx || (idx | 0) !== idx || idx < 0) {
42
+ throw new TypeError('Invalid path provided');
43
+ }
44
+ if (define) {
45
+ Object.defineProperty(cursor, key, value);
46
+ }
47
+ else {
48
+ cursor[idx] = value;
49
+ }
50
+ }
51
+ else if (define) {
52
+ Object.defineProperty(cursor, key, value);
53
+ }
54
+ else {
55
+ cursor[key] = value;
56
+ }
57
+ return true;
58
+ }
59
+ let nextCursor;
60
+ if (Array.isArray(cursor)) {
61
+ const idx = +key;
62
+ if (idx !== idx || (idx | 0) !== idx || idx < 0) {
63
+ throw new TypeError('Invalid path provided');
64
+ }
65
+ nextCursor = cursor[idx];
66
+ }
67
+ else {
68
+ nextCursor = cursor[key];
69
+ }
70
+ if (nextCursor === undefined || nextCursor === null) {
71
+ nextCursor = {};
72
+ if (Array.isArray(cursor)) {
73
+ cursor[+key] = nextCursor;
74
+ }
75
+ else {
76
+ cursor[key] = nextCursor;
77
+ }
78
+ }
79
+ else if (typeof nextCursor !== 'object') {
80
+ return false;
81
+ }
82
+ cursor = nextCursor;
83
+ }
47
84
  }
48
- return true;
85
+ return false;
49
86
  }
50
87
  export { deepSet, deepSet as default };
@@ -1,94 +1,129 @@
1
1
  import { isDateFormat } from '../date/isFormat';
2
- const RGX_TOKENS = /[^.[\]]+/g;
2
+ import { FORBIDDEN_KEYS } from '../string/forbiddenKeys';
3
3
  function assign(acc, rawkey, value, single) {
4
+ if (rawkey.indexOf('.') === -1 && rawkey.indexOf('[') === -1) {
5
+ if (FORBIDDEN_KEYS.has(rawkey))
6
+ return;
7
+ if (single?.has(rawkey)) {
8
+ acc[rawkey] = value;
9
+ return;
10
+ }
11
+ const existing = acc[rawkey];
12
+ if (existing === undefined) {
13
+ acc[rawkey] = value;
14
+ }
15
+ else if (Array.isArray(existing)) {
16
+ existing.push(value);
17
+ }
18
+ else {
19
+ acc[rawkey] = [existing, value];
20
+ }
21
+ return;
22
+ }
23
+ const keys = [];
24
+ let start = 0;
25
+ const len = rawkey.length;
26
+ for (let i = 0; i < len; i++) {
27
+ const code = rawkey.charCodeAt(i);
28
+ if (code === 46 || code === 91 || code === 93) {
29
+ if (i > start)
30
+ keys.push(rawkey.substring(start, i));
31
+ start = i + 1;
32
+ }
33
+ }
34
+ if (start < len)
35
+ keys.push(rawkey.substring(start));
4
36
  let cursor = acc;
5
- const keys = rawkey.match(RGX_TOKENS);
6
37
  const keys_len = keys.length;
7
38
  for (let i = 0; i < keys_len; i++) {
8
39
  const key = keys[i];
9
- switch (key) {
10
- case '__proto__':
11
- case 'constructor':
12
- case 'prototype':
13
- return;
14
- default: {
15
- if (i < (keys_len - 1)) {
16
- const n_key = Array.isArray(cursor) ? Number(key) : key;
17
- if (!cursor[n_key])
18
- cursor[n_key] = isNaN(Number(keys[i + 1])) ? {} : [];
19
- cursor = cursor[n_key];
20
- }
21
- else if (!(key in cursor) || (single && single.has(key))) {
22
- cursor[key] = value;
40
+ if (FORBIDDEN_KEYS.has(key))
41
+ return;
42
+ const isLast = i === keys_len - 1;
43
+ const cursorKey = Array.isArray(cursor) ? +key : key;
44
+ if (isLast) {
45
+ if (cursor[cursorKey] === undefined || (single && single.has(key))) {
46
+ cursor[cursorKey] = value;
47
+ }
48
+ else {
49
+ const existing = cursor[cursorKey];
50
+ if (Array.isArray(existing)) {
51
+ existing.push(value);
23
52
  }
24
53
  else {
25
- const cursor_val = cursor[key];
26
- if (Array.isArray(cursor_val)) {
27
- cursor_val.push(value);
28
- }
29
- else {
30
- cursor[key] = [cursor_val, value];
31
- }
54
+ cursor[cursorKey] = [existing, value];
32
55
  }
33
56
  }
34
57
  }
58
+ else {
59
+ if (cursor[cursorKey] === undefined) {
60
+ cursor[cursorKey] = isNaN(+keys[i + 1]) ? {} : [];
61
+ }
62
+ cursor = cursor[cursorKey];
63
+ }
35
64
  }
36
65
  }
37
66
  function toObject(form, config) {
38
67
  if (!(form instanceof FormData))
39
68
  throw new Error('formdata/toObject: Value is not an instance of FormData');
40
- const set = config?.raw === true ? null : new Set(Array.isArray(config?.raw) ? config?.raw : []);
41
- const set_guard = !!(set && set.size > 0);
42
- const single = Array.isArray(config?.single) ? new Set(config.single) : null;
43
- const nBool = config?.normalize_bool !== false;
44
- const nNull = config?.normalize_null !== false;
45
- const nDate = config?.normalize_date !== false;
46
- const nNumber = config?.normalize_number !== false;
47
69
  const acc = {};
48
- if (set === null) {
70
+ const single = Array.isArray(config?.single) ? new Set(config.single) : null;
71
+ if (config?.raw === true) {
49
72
  for (const [key, value] of form) {
50
73
  assign(acc, key, value, single);
51
74
  }
52
75
  return acc;
53
76
  }
77
+ const rawConfig = config?.raw;
78
+ const set = rawConfig ? new Set(Array.isArray(rawConfig) ? rawConfig : []) : null;
79
+ const hasSet = set !== null && set.size > 0;
80
+ const nBool = config?.normalize_bool !== false;
81
+ const nNull = config?.normalize_null !== false;
82
+ const nDate = config?.normalize_date !== false;
83
+ const nNumber = config?.normalize_number !== false;
54
84
  for (const [key, value] of form) {
55
- if (set_guard && set.has(key)) {
85
+ if (hasSet && set.has(key)) {
56
86
  assign(acc, key, value, single);
57
87
  continue;
58
88
  }
59
- switch (value) {
60
- case 'true':
61
- case 'TRUE':
62
- case 'True':
63
- assign(acc, key, nBool ? true : value, single);
64
- continue;
65
- case 'false':
66
- case 'FALSE':
67
- case 'False':
68
- assign(acc, key, nBool ? false : value, single);
69
- continue;
70
- case 'null':
71
- case 'NULL':
72
- case 'Null':
73
- assign(acc, key, nNull ? null : value, single);
89
+ if (typeof value === 'string') {
90
+ const len = value.length;
91
+ if (len === 0) {
92
+ assign(acc, key, value, single);
74
93
  continue;
75
- default: {
76
- if (typeof value === 'string' && value) {
77
- if (nNumber && value[0] !== '0') {
78
- const nVal = Number(value);
79
- if (!isNaN(nVal)) {
80
- assign(acc, key, nVal, single);
81
- continue;
82
- }
83
- }
84
- if (nDate && value[4] === '-' && value[7] === '-' && value[10] === 'T' && isDateFormat(value, 'ISO')) {
85
- assign(acc, key, new Date(value), single);
86
- continue;
87
- }
94
+ }
95
+ if (len === 4) {
96
+ if (nBool && (value === 'true' || value === 'TRUE' || value === 'True')) {
97
+ assign(acc, key, true, single);
98
+ continue;
88
99
  }
89
- assign(acc, key, value, single);
100
+ if (nNull && (value === 'null' || value === 'NULL' || value === 'Null')) {
101
+ assign(acc, key, null, single);
102
+ continue;
103
+ }
104
+ }
105
+ else if (len === 5) {
106
+ if (nBool && (value === 'false' || value === 'FALSE' || value === 'False')) {
107
+ assign(acc, key, false, single);
108
+ continue;
109
+ }
110
+ }
111
+ if (nNumber && value.charCodeAt(0) !== 48) {
112
+ const nVal = +value;
113
+ if (!isNaN(nVal)) {
114
+ assign(acc, key, nVal, single);
115
+ continue;
116
+ }
117
+ }
118
+ if (nDate && len >= 10 &&
119
+ value.charCodeAt(4) === 45 &&
120
+ value.charCodeAt(7) === 45 &&
121
+ isDateFormat(value, 'ISO')) {
122
+ assign(acc, key, new Date(value), single);
123
+ continue;
90
124
  }
91
125
  }
126
+ assign(acc, key, value, single);
92
127
  }
93
128
  return acc;
94
129
  }
package/esm/hash/djb2.js CHANGED
@@ -6,6 +6,6 @@ function djb2(data) {
6
6
  for (let i = 0; i < len; i++) {
7
7
  hash = ((hash << 5) + hash) ^ normalized.charCodeAt(i);
8
8
  }
9
- return String(hash >>> 0);
9
+ return (hash >>> 0).toString();
10
10
  }
11
11
  export { djb2, djb2 as default };
package/esm/hash/fnv1A.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { toString } from './utils';
2
2
  export const FNV_32 = 2166136261;
3
3
  export const FNV_64 = 1099511628211n;
4
+ const FNV_PRIME = 16777619;
4
5
  function fnv1A(data, offset = FNV_32) {
5
6
  let hash = offset;
6
- const normalized = toString(data);
7
- const len = normalized.length;
7
+ const str = toString(data);
8
+ const len = str.length;
8
9
  for (let i = 0; i < len; i++) {
9
- hash ^= normalized.charCodeAt(i);
10
- hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);
10
+ hash ^= str.charCodeAt(i);
11
+ hash = Math.imul(hash, FNV_PRIME);
11
12
  }
12
13
  return hash >>> 0;
13
14
  }
package/esm/hash/guid.js CHANGED
@@ -1,25 +1,37 @@
1
+ const CRYPTO = globalThis.crypto;
1
2
  const HEX = [];
2
3
  for (let i = 0; i < 256; i++) {
3
- HEX[i] = (i < 16 ? '0' : '') + i.toString(16);
4
- }
5
- let pool = new Uint8Array(0);
6
- let poolIdx = 0;
7
- function refill(size = 16 * 1024) {
8
- pool = new Uint8Array(size);
9
- crypto.getRandomValues(pool);
10
- poolIdx = 0;
4
+ HEX[i] = (i + 256).toString(16).substring(1);
11
5
  }
6
+ const POOL_SIZE = 16 * 1024;
7
+ const pool = new Uint8Array(POOL_SIZE);
8
+ let poolIdx = POOL_SIZE;
12
9
  function guid() {
13
- if (poolIdx + 16 > pool.length)
14
- refill();
15
- const buf = pool.subarray(poolIdx, poolIdx + 16);
10
+ if (poolIdx + 16 > POOL_SIZE) {
11
+ CRYPTO.getRandomValues(pool);
12
+ poolIdx = 0;
13
+ }
14
+ const p = poolIdx;
16
15
  poolIdx += 16;
17
- buf[6] = (buf[6] & 0x0f) | 0x40;
18
- buf[8] = (buf[8] & 0x3f) | 0x80;
19
- return (HEX[buf[0]] + HEX[buf[1]] + HEX[buf[2]] + HEX[buf[3]] + '-' +
20
- HEX[buf[4]] + HEX[buf[5]] + '-' +
21
- HEX[buf[6]] + HEX[buf[7]] + '-' +
22
- HEX[buf[8]] + HEX[buf[9]] + '-' +
23
- HEX[buf[10]] + HEX[buf[11]] + HEX[buf[12]] + HEX[buf[13]] + HEX[buf[14]] + HEX[buf[15]]);
16
+ return (HEX[pool[p]] +
17
+ HEX[pool[p + 1]] +
18
+ HEX[pool[p + 2]] +
19
+ HEX[pool[p + 3]] +
20
+ '-' +
21
+ HEX[pool[p + 4]] +
22
+ HEX[pool[p + 5]] +
23
+ '-' +
24
+ HEX[(pool[p + 6] & 0x0f) | 0x40] +
25
+ HEX[pool[p + 7]] +
26
+ '-' +
27
+ HEX[(pool[p + 8] & 0x3f) | 0x80] +
28
+ HEX[pool[p + 9]] +
29
+ '-' +
30
+ HEX[pool[p + 10]] +
31
+ HEX[pool[p + 11]] +
32
+ HEX[pool[p + 12]] +
33
+ HEX[pool[p + 13]] +
34
+ HEX[pool[p + 14]] +
35
+ HEX[pool[p + 15]]);
24
36
  }
25
37
  export { guid, guid as default };
package/esm/hash/hexId.js CHANGED
@@ -1,25 +1,33 @@
1
+ const CRYPTO = globalThis.crypto;
1
2
  const HEX = [];
2
3
  for (let i = 0; i < 256; i++) {
3
- HEX[i] = (i < 16 ? '0' : '') + i.toString(16);
4
- }
5
- let pool = new Uint8Array(0);
6
- let poolIdx = 0;
7
- function refill(size = 16 * 1024) {
8
- pool = new Uint8Array(size);
9
- crypto.getRandomValues(pool);
10
- poolIdx = 0;
4
+ HEX[i] = (i + 256).toString(16).substring(1);
11
5
  }
6
+ const POOL_SIZE = 16 * 1024;
7
+ const pool = new Uint8Array(POOL_SIZE);
8
+ let poolIdx = POOL_SIZE;
12
9
  function hexId(size) {
13
- if (!Number.isInteger(size) || size <= 0)
10
+ if (typeof size !== 'number' || size <= 0)
14
11
  return '';
15
- if (poolIdx + size > pool.length)
16
- refill();
17
- const buf = pool.subarray(poolIdx, poolIdx + size);
12
+ if (size > POOL_SIZE) {
13
+ const buf = new Uint8Array(size);
14
+ CRYPTO.getRandomValues(buf);
15
+ let out = '';
16
+ for (let i = 0; i < size; i++) {
17
+ out += HEX[buf[i]];
18
+ }
19
+ return out;
20
+ }
21
+ if (poolIdx + size > POOL_SIZE) {
22
+ CRYPTO.getRandomValues(pool);
23
+ poolIdx = 0;
24
+ }
25
+ let i = poolIdx;
26
+ const end = i + size;
18
27
  poolIdx += size;
19
28
  let out = '';
20
- for (let i = 0; i < buf.length; i++) {
21
- out += HEX[buf[i]];
22
- }
29
+ while (i < end)
30
+ out += HEX[pool[i++]];
23
31
  return out;
24
32
  }
25
33
  export { hexId, hexId as default };
package/esm/hash/utils.js CHANGED
@@ -1,37 +1,29 @@
1
1
  export function toString(raw) {
2
- switch (typeof raw) {
3
- case 'string':
4
- return raw;
5
- case 'number':
6
- return Number.isFinite(raw) ? String(raw) : 'nan';
7
- case 'bigint':
8
- return raw.toString();
9
- case 'boolean':
10
- return raw ? 'true' : 'false';
11
- case 'undefined':
12
- return 'undefined';
13
- case 'object':
14
- if (raw === null) {
15
- return 'null';
16
- }
17
- else if (Array.isArray(raw) || Object.prototype.toString.call(raw) === '[object Object]') {
18
- return JSON.stringify(raw);
19
- }
20
- else if (raw instanceof RegExp) {
21
- return String(raw);
22
- }
23
- else if (raw instanceof Date) {
24
- return String(raw.getTime());
25
- }
26
- else if (raw instanceof Error) {
27
- return raw.name + '|' + raw.message;
28
- }
29
- else {
30
- throw new TypeError('A Hash could not be calculated for this datatype');
31
- }
32
- case 'symbol':
2
+ const type = typeof raw;
3
+ if (type === 'string')
4
+ return raw;
5
+ if (type === 'number')
6
+ return Number.isFinite(raw) ? String(raw) : 'nan';
7
+ if (type === 'boolean')
8
+ return raw ? 'true' : 'false';
9
+ if (type === 'undefined')
10
+ return 'undefined';
11
+ if (type === 'object') {
12
+ if (raw === null)
13
+ return 'null';
14
+ if (Array.isArray(raw) || Object.prototype.toString.call(raw) === '[object Object]')
15
+ return JSON.stringify(raw);
16
+ if (raw instanceof Date)
17
+ return String(raw.getTime());
18
+ if (raw instanceof RegExp)
33
19
  return String(raw);
34
- default:
35
- throw new TypeError('A Hash could not be calculated for this datatype');
20
+ if (raw instanceof Error)
21
+ return raw.name + '|' + raw.message;
22
+ throw new TypeError('A Hash could not be calculated for this datatype');
36
23
  }
24
+ if (type === 'bigint')
25
+ return raw.toString();
26
+ if (type === 'symbol')
27
+ return raw.toString();
28
+ throw new TypeError('A Hash could not be calculated for this datatype');
37
29
  }
@@ -1,39 +1,40 @@
1
+ const CRYPTO = globalThis.crypto;
1
2
  const HEX = [];
2
3
  for (let i = 0; i < 256; i++) {
3
- HEX[i] = (i < 16 ? '0' : '') + i.toString(16);
4
- }
5
- let pool = new Uint8Array(0);
6
- let poolIdx = 0;
7
- function refill(size = 16 * 1024) {
8
- pool = new Uint8Array(size);
9
- crypto.getRandomValues(pool);
10
- poolIdx = 0;
4
+ HEX[i] = (i + 256).toString(16).substring(1);
11
5
  }
6
+ const POOL_SIZE = 16 * 1024;
7
+ const pool = new Uint8Array(POOL_SIZE);
8
+ let poolIdx = POOL_SIZE;
12
9
  function uuidv7() {
13
- if (poolIdx + 10 > pool.length)
14
- refill();
15
- const rand = pool.subarray(poolIdx, poolIdx + 10);
10
+ if (poolIdx + 10 > POOL_SIZE) {
11
+ CRYPTO.getRandomValues(pool);
12
+ poolIdx = 0;
13
+ }
14
+ const p = poolIdx;
16
15
  poolIdx += 10;
17
- const time = BigInt(Date.now());
18
- return (HEX[Number((time >> 40n) & 0xffn)] +
19
- HEX[Number((time >> 32n) & 0xffn)] +
20
- HEX[Number((time >> 24n) & 0xffn)] +
21
- HEX[Number((time >> 16n) & 0xffn)] +
16
+ const time = Date.now();
17
+ const timeHi = (time / 4294967296) | 0;
18
+ const timeLo = time >>> 0;
19
+ return (HEX[(timeHi >>> 8) & 0xff] +
20
+ HEX[timeHi & 0xff] +
21
+ HEX[(timeLo >>> 24) & 0xff] +
22
+ HEX[(timeLo >>> 16) & 0xff] +
22
23
  '-' +
23
- HEX[Number((time >> 8n) & 0xffn)] +
24
- HEX[Number(time & 0xffn)] +
24
+ HEX[(timeLo >>> 8) & 0xff] +
25
+ HEX[timeLo & 0xff] +
25
26
  '-' +
26
- HEX[(rand[0] & 0x0f) | 0x70] +
27
- HEX[rand[1]] +
27
+ HEX[(pool[p] & 0x0f) | 0x70] +
28
+ HEX[pool[p + 1]] +
28
29
  '-' +
29
- HEX[(rand[2] & 0x3f) | 0x80] +
30
- HEX[rand[3]] +
30
+ HEX[(pool[p + 2] & 0x3f) | 0x80] +
31
+ HEX[pool[p + 3]] +
31
32
  '-' +
32
- HEX[rand[4]] +
33
- HEX[rand[5]] +
34
- HEX[rand[6]] +
35
- HEX[rand[7]] +
36
- HEX[rand[8]] +
37
- HEX[rand[9]]);
33
+ HEX[pool[p + 4]] +
34
+ HEX[pool[p + 5]] +
35
+ HEX[pool[p + 6]] +
36
+ HEX[pool[p + 7]] +
37
+ HEX[pool[p + 8]] +
38
+ HEX[pool[p + 9]]);
38
39
  }
39
40
  export { uuidv7, uuidv7 as default };
@@ -0,0 +1,5 @@
1
+ export const FORBIDDEN_KEYS = new Set([
2
+ '__proto__',
3
+ 'constructor',
4
+ 'prototype',
5
+ ]);
@@ -5,6 +5,7 @@ function humanizeNumber(val, options = {}) {
5
5
  const SEPARATOR = typeof options?.separator === 'string' && options.separator.length ? options.separator : '.';
6
6
  const PRECISION = Number.isInteger(options?.precision) && options.precision >= 0 ? options.precision : 2;
7
7
  const DIVIDER = Number.isInteger(options?.divider) && options.divider >= 2 ? options.divider : 1000;
8
+ const INV_DIVIDER = 1.0 / DIVIDER;
8
9
  const REAL = options?.real === true;
9
10
  const UNITS = Array.isArray(options?.units) && options.units.length
10
11
  ? options.units
@@ -21,7 +22,7 @@ function humanizeNumber(val, options = {}) {
21
22
  let unit_ix = 0;
22
23
  if (UNITS) {
23
24
  while (normalized >= DIVIDER && unit_ix < UNITS.length - 1) {
24
- normalized /= DIVIDER;
25
+ normalized *= INV_DIVIDER;
25
26
  unit_ix++;
26
27
  }
27
28
  }
package/index.d.ts CHANGED
@@ -291,6 +291,9 @@ declare module "date/index" {
291
291
  export { isDateFormat } from "date/isFormat";
292
292
  export { isDate } from "date/is";
293
293
  }
294
+ declare module "string/forbiddenKeys" {
295
+ export const FORBIDDEN_KEYS: Set<string>;
296
+ }
294
297
  declare module "formdata/toObject" {
295
298
  type ToObjectConfig = {
296
299
  raw?: string[] | boolean;