@github/browser-support 2.0.1 → 3.0.1
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/lib/index.d.ts +0 -16
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +20 -38
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/abortsignal-abort.d.ts +0 -10
- package/lib/abortsignal-abort.d.ts.map +0 -1
- package/lib/abortsignal-abort.js +0 -19
- package/lib/abortsignal-abort.js.map +0 -1
- package/lib/array-findlast.d.ts +0 -5
- package/lib/array-findlast.d.ts.map +0 -1
- package/lib/array-findlast.js +0 -21
- package/lib/array-findlast.js.map +0 -1
- package/lib/array-findlastindex.d.ts +0 -5
- package/lib/array-findlastindex.d.ts.map +0 -1
- package/lib/array-findlastindex.js +0 -26
- package/lib/array-findlastindex.js.map +0 -1
- package/lib/arraylike-at.d.ts +0 -5
- package/lib/arraylike-at.d.ts.map +0 -1
- package/lib/arraylike-at.js +0 -34
- package/lib/arraylike-at.js.map +0 -1
- package/lib/crypto-randomuuid.d.ts +0 -10
- package/lib/crypto-randomuuid.d.ts.map +0 -1
- package/lib/crypto-randomuuid.js +0 -25
- package/lib/crypto-randomuuid.js.map +0 -1
- package/lib/event-abortsignal.d.ts +0 -10
- package/lib/event-abortsignal.d.ts.map +0 -1
- package/lib/event-abortsignal.js +0 -36
- package/lib/event-abortsignal.js.map +0 -1
- package/lib/form-requestsubmit.d.ts +0 -5
- package/lib/form-requestsubmit.d.ts.map +0 -1
- package/lib/form-requestsubmit.js +0 -27
- package/lib/form-requestsubmit.js.map +0 -1
- package/lib/object-hasown.d.ts +0 -10
- package/lib/object-hasown.d.ts.map +0 -1
- package/lib/object-hasown.js +0 -25
- package/lib/object-hasown.js.map +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
import * as abortSignalAbort from './abortsignal-abort.js';
|
|
2
1
|
import * as abortSignalTimeout from './abortsignal-timeout.js';
|
|
3
|
-
import * as arrayAt from './arraylike-at.js';
|
|
4
2
|
import * as clipboardItem from './clipboarditem.js';
|
|
5
|
-
import * as cryptoRandomUUID from './crypto-randomuuid.js';
|
|
6
3
|
import * as elementCheckVisibility from './element-checkvisibility.js';
|
|
7
|
-
import * as eventAbortSignal from './event-abortsignal.js';
|
|
8
4
|
import * as navigatorClipboard from './navigator-clipboard.js';
|
|
9
|
-
import * as formRequestSubmit from './form-requestsubmit.js';
|
|
10
|
-
import * as objectHasOwn from './object-hasown.js';
|
|
11
5
|
import * as requestIdleCallback from './requestidlecallback.js';
|
|
12
|
-
import * as arrayFindLast from './array-findlast.js';
|
|
13
|
-
import * as arrayFindLastIndex from './array-findlastindex.js';
|
|
14
6
|
export declare const baseSupport: boolean;
|
|
15
7
|
export declare const polyfills: {
|
|
16
|
-
abortSignalAbort: typeof abortSignalAbort;
|
|
17
8
|
abortSignalTimeout: typeof abortSignalTimeout;
|
|
18
|
-
arrayAt: typeof arrayAt;
|
|
19
9
|
clipboardItem: typeof clipboardItem;
|
|
20
|
-
cryptoRandomUUID: typeof cryptoRandomUUID;
|
|
21
10
|
elementCheckVisibility: typeof elementCheckVisibility;
|
|
22
|
-
eventAbortSignal: typeof eventAbortSignal;
|
|
23
11
|
navigatorClipboard: typeof navigatorClipboard;
|
|
24
|
-
formRequestSubmit: typeof formRequestSubmit;
|
|
25
|
-
objectHasOwn: typeof objectHasOwn;
|
|
26
12
|
requestIdleCallback: typeof requestIdleCallback;
|
|
27
|
-
arrayFindLast: typeof arrayFindLast;
|
|
28
|
-
arrayFindLastIndex: typeof arrayFindLastIndex;
|
|
29
13
|
};
|
|
30
14
|
export declare function isSupported(): boolean;
|
|
31
15
|
export declare function isPolyfilled(): boolean;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,sBAAsB,MAAM,8BAA8B,CAAA;AACtE,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAA;AAU/D,eAAO,MAAM,WAAW,SA6BlB,CAAA;AAEN,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAA;AAED,wBAAgB,WAAW,YAE1B;AAED,wBAAgB,YAAY,YAE3B;AAED,wBAAgB,KAAK,SAIpB"}
|
package/lib/index.js
CHANGED
|
@@ -1,33 +1,17 @@
|
|
|
1
|
-
import * as abortSignalAbort from './abortsignal-abort.js';
|
|
2
1
|
import * as abortSignalTimeout from './abortsignal-timeout.js';
|
|
3
|
-
import * as arrayAt from './arraylike-at.js';
|
|
4
2
|
import * as clipboardItem from './clipboarditem.js';
|
|
5
|
-
import * as cryptoRandomUUID from './crypto-randomuuid.js';
|
|
6
3
|
import * as elementCheckVisibility from './element-checkvisibility.js';
|
|
7
|
-
import * as eventAbortSignal from './event-abortsignal.js';
|
|
8
4
|
import * as navigatorClipboard from './navigator-clipboard.js';
|
|
9
|
-
import * as formRequestSubmit from './form-requestsubmit.js';
|
|
10
|
-
import * as objectHasOwn from './object-hasown.js';
|
|
11
5
|
import * as requestIdleCallback from './requestidlecallback.js';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
typeof queueMicrotask === 'function' &&
|
|
22
|
-
typeof TextEncoder === 'function' &&
|
|
23
|
-
typeof TextDecoder === 'function' &&
|
|
24
|
-
typeof customElements === 'object' &&
|
|
25
|
-
typeof HTMLDetailsElement === 'function' &&
|
|
26
|
-
typeof AbortController === 'function' &&
|
|
27
|
-
typeof AbortSignal === 'function' &&
|
|
28
|
-
typeof globalThis === 'object' &&
|
|
29
|
-
'entries' in FormData.prototype &&
|
|
30
|
-
'toggleAttribute' in Element.prototype &&
|
|
6
|
+
let supportsModalPseudo = false;
|
|
7
|
+
try {
|
|
8
|
+
// This will error in older browsers
|
|
9
|
+
supportsModalPseudo = document.body.matches(':modal') === false;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
supportsModalPseudo = false;
|
|
13
|
+
}
|
|
14
|
+
export const baseSupport = typeof globalThis === 'object' &&
|
|
31
15
|
// ES2019
|
|
32
16
|
'fromEntries' in Object &&
|
|
33
17
|
'flatMap' in Array.prototype &&
|
|
@@ -39,31 +23,29 @@ export const baseSupport = typeof Blob === 'function' &&
|
|
|
39
23
|
'replaceAll' in String.prototype &&
|
|
40
24
|
'any' in Promise &&
|
|
41
25
|
// ES2022
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
'at' in String.prototype &&
|
|
27
|
+
'at' in Array.prototype &&
|
|
28
|
+
'hasOwn' in Object &&
|
|
45
29
|
// ESNext
|
|
46
|
-
|
|
30
|
+
'abort' in AbortSignal &&
|
|
47
31
|
// 'timeout' in AbortSignal && // Polyfilled
|
|
32
|
+
// DOM / HTML and other specs
|
|
33
|
+
typeof queueMicrotask === 'function' &&
|
|
34
|
+
typeof HTMLDialogElement === 'function' &&
|
|
35
|
+
supportsModalPseudo &&
|
|
48
36
|
typeof AggregateError === 'function' &&
|
|
49
|
-
|
|
37
|
+
typeof BroadcastChannel === 'function' &&
|
|
38
|
+
'randomUUID' in crypto &&
|
|
50
39
|
'replaceChildren' in Element.prototype &&
|
|
40
|
+
'requestSubmit' in HTMLFormElement.prototype &&
|
|
51
41
|
// 'requestIdleCallback' in window && // Polyfilled
|
|
52
42
|
true;
|
|
53
43
|
export const polyfills = {
|
|
54
|
-
abortSignalAbort,
|
|
55
44
|
abortSignalTimeout,
|
|
56
|
-
arrayAt,
|
|
57
45
|
clipboardItem,
|
|
58
|
-
cryptoRandomUUID,
|
|
59
46
|
elementCheckVisibility,
|
|
60
|
-
eventAbortSignal,
|
|
61
47
|
navigatorClipboard,
|
|
62
|
-
formRequestSubmit,
|
|
63
|
-
objectHasOwn,
|
|
64
48
|
requestIdleCallback,
|
|
65
|
-
arrayFindLast,
|
|
66
|
-
arrayFindLastIndex,
|
|
67
49
|
};
|
|
68
50
|
export function isSupported() {
|
|
69
51
|
return baseSupport && Object.values(polyfills).every(polyfill => polyfill.isSupported());
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,sBAAsB,MAAM,8BAA8B,CAAA;AACtE,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAA;AAE/D,IAAI,mBAAmB,GAAG,KAAK,CAAA;AAC/B,IAAI;IACF,oCAAoC;IACpC,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAA;CAChE;AAAC,MAAM;IACN,mBAAmB,GAAG,KAAK,CAAA;CAC5B;AAED,MAAM,CAAC,MAAM,WAAW,GACtB,OAAO,UAAU,KAAK,QAAQ;IAC9B,SAAS;IACT,aAAa,IAAI,MAAM;IACvB,SAAS,IAAI,KAAK,CAAC,SAAS;IAC5B,SAAS,IAAI,MAAM,CAAC,SAAS;IAC7B,SAAS;IACT,YAAY,IAAI,OAAO;IACvB,UAAU,IAAI,MAAM,CAAC,SAAS;IAC9B,SAAS;IACT,YAAY,IAAI,MAAM,CAAC,SAAS;IAChC,KAAK,IAAI,OAAO;IAChB,SAAS;IACT,IAAI,IAAI,MAAM,CAAC,SAAS;IACxB,IAAI,IAAI,KAAK,CAAC,SAAS;IACvB,QAAQ,IAAI,MAAM;IAClB,SAAS;IACT,OAAO,IAAI,WAAW;IACtB,4CAA4C;IAC5C,6BAA6B;IAC7B,OAAO,cAAc,KAAK,UAAU;IACpC,OAAO,iBAAiB,KAAK,UAAU;IACvC,mBAAmB;IACnB,OAAO,cAAc,KAAK,UAAU;IACpC,OAAO,gBAAgB,KAAK,UAAU;IACtC,YAAY,IAAI,MAAM;IACtB,iBAAiB,IAAI,OAAO,CAAC,SAAS;IACtC,eAAe,IAAI,eAAe,CAAC,SAAS;IAC5C,mDAAmD;IACnD,IAAI,CAAA;AAEN,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,kBAAkB;IAClB,aAAa;IACb,sBAAsB;IACtB,kBAAkB;IAClB,mBAAmB;CACpB,CAAA;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;AAC1F,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAA;AAC5E,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;QAC/C,QAAQ,CAAC,KAAK,EAAE,CAAA;KACjB;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function abortSignalAbort(reason: unknown): AbortSignal;
|
|
2
|
-
declare global {
|
|
3
|
-
interface AbortController {
|
|
4
|
-
abort(reason: unknown): void;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export declare function isSupported(): boolean;
|
|
8
|
-
export declare function isPolyfilled(): boolean;
|
|
9
|
-
export declare function apply(): void;
|
|
10
|
-
//# sourceMappingURL=abortsignal-abort.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abortsignal-abort.d.ts","sourceRoot":"","sources":["../src/abortsignal-abort.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,eAI/C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe;QACvB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;KAC7B;CACF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}
|
package/lib/abortsignal-abort.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function abortSignalAbort(reason) {
|
|
2
|
-
const controller = new AbortController();
|
|
3
|
-
controller.abort(reason);
|
|
4
|
-
return controller.signal;
|
|
5
|
-
}
|
|
6
|
-
/*#__PURE__*/
|
|
7
|
-
export function isSupported() {
|
|
8
|
-
return 'abort' in AbortSignal && typeof AbortSignal.abort === 'function';
|
|
9
|
-
}
|
|
10
|
-
/*#__PURE__*/
|
|
11
|
-
export function isPolyfilled() {
|
|
12
|
-
return AbortSignal.abort === abortSignalAbort;
|
|
13
|
-
}
|
|
14
|
-
export function apply() {
|
|
15
|
-
if (!isSupported()) {
|
|
16
|
-
AbortSignal.abort = abortSignalAbort;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=abortsignal-abort.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abortsignal-abort.js","sourceRoot":"","sources":["../src/abortsignal-abort.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,MAAe;IAC9C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAA;AAC1B,CAAC;AAQD,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,IAAI,WAAW,IAAI,OAAO,WAAW,CAAC,KAAK,KAAK,UAAU,CAAA;AAC1E,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,WAAW,CAAC,KAAK,KAAK,gBAAgB,CAAA;AAC/C,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAA;KACrC;AACH,CAAC"}
|
package/lib/array-findlast.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function arrayFindLast<T>(this: T[], pred: (this: T[], value: T, i: number, array: T[]) => boolean, recv?: T[]): T | void;
|
|
2
|
-
export declare function isSupported(): boolean;
|
|
3
|
-
export declare function isPolyfilled(): boolean;
|
|
4
|
-
export declare function apply(): void;
|
|
5
|
-
//# sourceMappingURL=array-findlast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array-findlast.d.ts","sourceRoot":"","sources":["../src/array-findlast.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,CAAC,EAC7B,IAAI,EAAE,CAAC,EAAE,EACT,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,EAC7D,IAAI,MAAO,GACV,CAAC,GAAG,IAAI,CAIV;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAK5B"}
|
package/lib/array-findlast.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function arrayFindLast(pred, recv = this) {
|
|
2
|
-
for (let i = this.length - 1; i >= 0; i -= 1) {
|
|
3
|
-
if (pred.call(recv, this[i], i, this))
|
|
4
|
-
return this[i];
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
/*#__PURE__*/
|
|
8
|
-
export function isSupported() {
|
|
9
|
-
return 'findLast' in Array.prototype && typeof Array.prototype.findLast === 'function';
|
|
10
|
-
}
|
|
11
|
-
/*#__PURE__*/
|
|
12
|
-
export function isPolyfilled() {
|
|
13
|
-
return Array.prototype.findLast === arrayFindLast;
|
|
14
|
-
}
|
|
15
|
-
export function apply() {
|
|
16
|
-
if (!isSupported()) {
|
|
17
|
-
const defn = { value: arrayFindLast, writable: true, configurable: true };
|
|
18
|
-
Object.defineProperty(Array.prototype, 'findLast', defn);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=array-findlast.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array-findlast.js","sourceRoot":"","sources":["../src/array-findlast.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAE3B,IAA6D,EAC7D,IAAI,GAAG,IAAI;IAEX,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;QAC5C,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;KACtD;AACH,CAAC;AAED,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,UAAU,IAAI,KAAK,CAAC,SAAS,IAAI,OAAO,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,UAAU,CAAA;AACxF,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,aAAa,CAAA;AACnD,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,MAAM,IAAI,GAAG,EAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,CAAA;QACvE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;KACzD;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function arrayFindLastIndex<T>(this: T[], pred: (this: T[], value: T, i: number, array: T[]) => boolean, recv?: T[]): number;
|
|
2
|
-
export declare function isSupported(): boolean;
|
|
3
|
-
export declare function isPolyfilled(): boolean;
|
|
4
|
-
export declare function apply(): void;
|
|
5
|
-
//# sourceMappingURL=array-findlastindex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array-findlastindex.d.ts","sourceRoot":"","sources":["../src/array-findlastindex.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,IAAI,EAAE,CAAC,EAAE,EACT,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,EAC7D,IAAI,MAAO,GACV,MAAM,CAKR;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAS5B"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export function arrayFindLastIndex(pred, recv = this) {
|
|
2
|
-
for (let i = this.length - 1; i >= 0; i -= 1) {
|
|
3
|
-
if (pred.call(recv, this[i], i, this))
|
|
4
|
-
return i;
|
|
5
|
-
}
|
|
6
|
-
return -1;
|
|
7
|
-
}
|
|
8
|
-
/*#__PURE__*/
|
|
9
|
-
export function isSupported() {
|
|
10
|
-
return 'findLastIndex' in Array.prototype && typeof Array.prototype.findLastIndex === 'function';
|
|
11
|
-
}
|
|
12
|
-
/*#__PURE__*/
|
|
13
|
-
export function isPolyfilled() {
|
|
14
|
-
return Array.prototype.findLastIndex === arrayFindLastIndex;
|
|
15
|
-
}
|
|
16
|
-
export function apply() {
|
|
17
|
-
if (!isSupported()) {
|
|
18
|
-
const defn = {
|
|
19
|
-
value: arrayFindLastIndex,
|
|
20
|
-
writable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(Array.prototype, 'findLastIndex', defn);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=array-findlastindex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array-findlastindex.js","sourceRoot":"","sources":["../src/array-findlastindex.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAEhC,IAA6D,EAC7D,IAAI,GAAG,IAAI;IAEX,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;QAC5C,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC;YAAE,OAAO,CAAC,CAAA;KAChD;IACD,OAAO,CAAC,CAAC,CAAA;AACX,CAAC;AAED,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,eAAe,IAAI,KAAK,CAAC,SAAS,IAAI,OAAO,KAAK,CAAC,SAAS,CAAC,aAAa,KAAK,UAAU,CAAA;AAClG,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAK,CAAC,SAAS,CAAC,aAAa,KAAK,kBAAkB,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,MAAM,IAAI,GAAG;YACX,KAAK,EAAE,kBAAkB;YACzB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;SACnB,CAAA;QACD,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,eAAe,EAAE,IAAI,CAAC,CAAA;KAC9D;AACH,CAAC"}
|
package/lib/arraylike-at.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arraylike-at.d.ts","sourceRoot":"","sources":["../src/arraylike-at.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAKtE;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAUrC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAOtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAO5B"}
|
package/lib/arraylike-at.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const TypedArray = Reflect.getPrototypeOf(Int8Array);
|
|
2
|
-
export function arrayLikeAt(i) {
|
|
3
|
-
const l = this.length;
|
|
4
|
-
i = Math.trunc(i) || 0;
|
|
5
|
-
if (i < 0)
|
|
6
|
-
i += l;
|
|
7
|
-
return i < 0 || i >= l ? undefined : this[i];
|
|
8
|
-
}
|
|
9
|
-
/*#__PURE__*/
|
|
10
|
-
export function isSupported() {
|
|
11
|
-
return ('at' in Array.prototype &&
|
|
12
|
-
typeof Array.prototype.at === 'function' &&
|
|
13
|
-
'at' in String.prototype &&
|
|
14
|
-
typeof String.prototype.at === 'function' &&
|
|
15
|
-
typeof TypedArray === 'function' &&
|
|
16
|
-
'at' in TypedArray.prototype &&
|
|
17
|
-
typeof TypedArray.prototype.at === 'function');
|
|
18
|
-
}
|
|
19
|
-
/*#__PURE__*/
|
|
20
|
-
export function isPolyfilled() {
|
|
21
|
-
return (Array.prototype.at === arrayLikeAt &&
|
|
22
|
-
String.prototype.at === arrayLikeAt &&
|
|
23
|
-
typeof TypedArray === 'function' &&
|
|
24
|
-
TypedArray.prototype.at === arrayLikeAt);
|
|
25
|
-
}
|
|
26
|
-
export function apply() {
|
|
27
|
-
if (!isSupported()) {
|
|
28
|
-
const defn = { value: arrayLikeAt, writable: true, configurable: true };
|
|
29
|
-
Object.defineProperty(Array.prototype, 'at', defn);
|
|
30
|
-
Object.defineProperty(String.prototype, 'at', defn);
|
|
31
|
-
Object.defineProperty(TypedArray, 'at', defn);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=arraylike-at.js.map
|
package/lib/arraylike-at.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arraylike-at.js","sourceRoot":"","sources":["../src/arraylike-at.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,CAAgC,CAAA;AAEnF,MAAM,UAAU,WAAW,CAAwB,CAAS;IAC1D,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAA;IACrB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,CAAC,GAAG,CAAC;QAAE,CAAC,IAAI,CAAC,CAAA;IACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,IAAI,IAAI,KAAK,CAAC,SAAS;QACvB,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,UAAU;QACxC,IAAI,IAAI,MAAM,CAAC,SAAS;QACxB,OAAO,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,UAAU;QACzC,OAAO,UAAU,KAAK,UAAU;QAChC,IAAI,IAAI,UAAU,CAAC,SAAS;QAC5B,OAAO,UAAU,CAAC,SAAS,CAAC,EAAE,KAAK,UAAU,CAC9C,CAAA;AACH,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,CACL,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,WAAW;QAClC,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,WAAW;QACnC,OAAO,UAAU,KAAK,UAAU;QAChC,UAAU,CAAC,SAAS,CAAC,EAAE,KAAK,WAAW,CACxC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,MAAM,IAAI,GAAG,EAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,CAAA;QACrE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAClD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACnD,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;KAC9C;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
|
|
2
|
-
declare global {
|
|
3
|
-
interface Crypto {
|
|
4
|
-
randomUUID(): string;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export declare function isSupported(): boolean;
|
|
8
|
-
export declare function isPolyfilled(): boolean;
|
|
9
|
-
export declare function apply(): void;
|
|
10
|
-
//# sourceMappingURL=crypto-randomuuid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto-randomuuid.d.ts","sourceRoot":"","sources":["../src/crypto-randomuuid.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,IAAI,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAUhF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,IAAI,MAAM,CAAA;KACrB;CACF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}
|
package/lib/crypto-randomuuid.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export function randomUUID() {
|
|
2
|
-
const buf = new Uint32Array(4);
|
|
3
|
-
crypto.getRandomValues(buf);
|
|
4
|
-
let idx = -1;
|
|
5
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
6
|
-
idx++;
|
|
7
|
-
const r = (buf[idx >> 3] >> ((idx % 8) * 4)) & 15;
|
|
8
|
-
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
9
|
-
return v.toString(16);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
/*#__PURE__*/
|
|
13
|
-
export function isSupported() {
|
|
14
|
-
return typeof crypto === 'object' && 'randomUUID' in crypto && typeof crypto.randomUUID === 'function';
|
|
15
|
-
}
|
|
16
|
-
/*#__PURE__*/
|
|
17
|
-
export function isPolyfilled() {
|
|
18
|
-
return isSupported() && crypto.randomUUID === randomUUID;
|
|
19
|
-
}
|
|
20
|
-
export function apply() {
|
|
21
|
-
if (!isSupported()) {
|
|
22
|
-
crypto.randomUUID = randomUUID;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=crypto-randomuuid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto-randomuuid.js","sourceRoot":"","sources":["../src/crypto-randomuuid.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU;IACxB,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;IAC9B,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IAC3B,IAAI,GAAG,GAAG,CAAC,CAAC,CAAA;IACZ,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QACxE,GAAG,EAAE,CAAA;QACL,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;QACjD,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;QACzC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACvB,CAAC,CAAwD,CAAA;AAC3D,CAAC;AAQD,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,YAAY,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,CAAA;AACxG,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,WAAW,EAAE,IAAI,MAAM,CAAC,UAAU,KAAK,UAAU,CAAA;AAC1D,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,MAAM,CAAC,UAAU,GAAG,UAAU,CAAA;KAC/B;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function addEventListenerWithAbortSignal(this: EventTarget, type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
|
2
|
-
declare global {
|
|
3
|
-
interface AddEventListenerOptions {
|
|
4
|
-
signal?: AbortSignal;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export declare function isSupported(): boolean;
|
|
8
|
-
export declare function isPolyfilled(): boolean;
|
|
9
|
-
export declare function apply(): void;
|
|
10
|
-
//# sourceMappingURL=event-abortsignal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-abortsignal.d.ts","sourceRoot":"","sources":["../src/event-abortsignal.ts"],"names":[],"mappings":"AACA,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,GAAG,IAAI,EACnD,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,GAC1C,IAAI,CAQN;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,uBAAuB;QAC/B,MAAM,CAAC,EAAE,WAAW,CAAA;KACrB;CACF;AAED,wBAAgB,WAAW,IAAI,OAAO,CAcrC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}
|
package/lib/event-abortsignal.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
2
|
-
export function addEventListenerWithAbortSignal(type, callback, options) {
|
|
3
|
-
if (typeof options === 'object' && 'signal' in options && options.signal instanceof AbortSignal) {
|
|
4
|
-
if (options.signal.aborted)
|
|
5
|
-
return;
|
|
6
|
-
originalAddEventListener.call(options.signal, 'abort', () => {
|
|
7
|
-
this.removeEventListener(type, callback, options);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
return originalAddEventListener.call(this, type, callback, options);
|
|
11
|
-
}
|
|
12
|
-
export function isSupported() {
|
|
13
|
-
let signalSupported = false;
|
|
14
|
-
const setSignalSupported = () => (signalSupported = true);
|
|
15
|
-
function noop() { }
|
|
16
|
-
const options = Object.create({}, { signal: { get: setSignalSupported } });
|
|
17
|
-
try {
|
|
18
|
-
const target = new EventTarget();
|
|
19
|
-
target.addEventListener('test', noop, options);
|
|
20
|
-
target.removeEventListener('test', noop, options);
|
|
21
|
-
return signalSupported;
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return signalSupported;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/*#__PURE__*/
|
|
28
|
-
export function isPolyfilled() {
|
|
29
|
-
return EventTarget.prototype.addEventListener === addEventListenerWithAbortSignal;
|
|
30
|
-
}
|
|
31
|
-
export function apply() {
|
|
32
|
-
if (typeof AbortSignal === 'function' && !isSupported()) {
|
|
33
|
-
EventTarget.prototype.addEventListener = addEventListenerWithAbortSignal;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=event-abortsignal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-abortsignal.js","sourceRoot":"","sources":["../src/event-abortsignal.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,WAAW,CAAC,SAAS,CAAC,gBAAgB,CAAA;AACvE,MAAM,UAAU,+BAA+B,CAE7C,IAAY,EACZ,QAAmD,EACnD,OAA2C;IAE3C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,YAAY,WAAW,EAAE;QAC/F,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO;YAAE,OAAM;QAClC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;YAC1D,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;AACrE,CAAC;AAQD,MAAM,UAAU,WAAW;IACzB,IAAI,eAAe,GAAG,KAAK,CAAA;IAC3B,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;IAEzD,SAAS,IAAI,KAAI,CAAC;IAClB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAC,MAAM,EAAE,EAAC,GAAG,EAAE,kBAAkB,EAAC,EAAC,CAAC,CAAA;IACtE,IAAI;QACF,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;QAChC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QAC9C,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACjD,OAAO,eAAe,CAAA;KACvB;IAAC,MAAM;QACN,OAAO,eAAe,CAAA;KACvB;AACH,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,WAAW,CAAC,SAAS,CAAC,gBAAgB,KAAK,+BAA+B,CAAA;AACnF,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,OAAO,WAAW,KAAK,UAAU,IAAI,CAAC,WAAW,EAAE,EAAE;QACvD,WAAW,CAAC,SAAS,CAAC,gBAAgB,GAAG,+BAA+B,CAAA;KACzE;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function requestSubmit(this: HTMLFormElement, submitter?: HTMLButtonElement | HTMLInputElement | null): void;
|
|
2
|
-
export declare function isSupported(): boolean;
|
|
3
|
-
export declare function isPolyfilled(): boolean;
|
|
4
|
-
export declare function apply(): void;
|
|
5
|
-
//# sourceMappingURL=form-requestsubmit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-requestsubmit.d.ts","sourceRoot":"","sources":["../src/form-requestsubmit.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,SAAS,GAAE,iBAAiB,GAAG,gBAAgB,GAAG,IAAW,GAC5D,IAAI,CAcN;AAED,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export function requestSubmit(submitter = null) {
|
|
2
|
-
const event = new SubmitEvent('submit', { bubbles: true, cancelable: true, submitter });
|
|
3
|
-
let input;
|
|
4
|
-
if (submitter && submitter.name) {
|
|
5
|
-
input = Object.assign(document.createElement('input'), {
|
|
6
|
-
type: 'hidden',
|
|
7
|
-
hidden: true,
|
|
8
|
-
name: submitter.name,
|
|
9
|
-
value: submitter.value,
|
|
10
|
-
});
|
|
11
|
-
this.append(input);
|
|
12
|
-
}
|
|
13
|
-
this.checkValidity() && !this.dispatchEvent(event) && this.submit();
|
|
14
|
-
input?.remove();
|
|
15
|
-
}
|
|
16
|
-
export function isSupported() {
|
|
17
|
-
return 'requestSubmit' in HTMLFormElement.prototype && typeof HTMLFormElement.prototype.requestSubmit === 'function';
|
|
18
|
-
}
|
|
19
|
-
export function isPolyfilled() {
|
|
20
|
-
return HTMLFormElement.prototype.requestSubmit === requestSubmit;
|
|
21
|
-
}
|
|
22
|
-
export function apply() {
|
|
23
|
-
if (!isSupported()) {
|
|
24
|
-
HTMLFormElement.prototype.requestSubmit = requestSubmit;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=form-requestsubmit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-requestsubmit.js","sourceRoot":"","sources":["../src/form-requestsubmit.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAE3B,YAAyD,IAAI;IAE7D,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC,CAAA;IACrF,IAAI,KAAK,CAAA;IACT,IAAI,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE;QAC/B,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;YACrD,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,KAAK,EAAE,SAAS,CAAC,KAAK;SACvB,CAAC,CAAA;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;KACnB;IACD,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAA;IACnE,KAAK,EAAE,MAAM,EAAE,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,eAAe,IAAI,eAAe,CAAC,SAAS,IAAI,OAAO,eAAe,CAAC,SAAS,CAAC,aAAa,KAAK,UAAU,CAAA;AACtH,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,CAAC,SAAS,CAAC,aAAa,KAAK,aAAa,CAAA;AAClE,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,eAAe,CAAC,SAAS,CAAC,aAAa,GAAG,aAAa,CAAA;KACxD;AACH,CAAC"}
|
package/lib/object-hasown.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function objectHasOwn(object: unknown, property: PropertyKey): boolean;
|
|
2
|
-
declare global {
|
|
3
|
-
interface Object {
|
|
4
|
-
hasOwn: <Key extends PropertyKey>(object: unknown, property: Key) => object is unknown & Record<Key, unknown>;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export declare function isSupported(): boolean;
|
|
8
|
-
export declare function isPolyfilled(): boolean;
|
|
9
|
-
export declare function apply(): void;
|
|
10
|
-
//# sourceMappingURL=object-hasown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-hasown.d.ts","sourceRoot":"","sources":["../src/object-hasown.ts"],"names":[],"mappings":"AACA,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,WAKlE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,CAAC,GAAG,SAAS,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,MAAM,IAAI,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;KAC9G;CACF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAQ5B"}
|
package/lib/object-hasown.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const phasOwn = Object.prototype.hasOwnProperty;
|
|
2
|
-
export function objectHasOwn(object, property) {
|
|
3
|
-
if (object == null) {
|
|
4
|
-
throw new TypeError('Cannot convert undefined or null to object');
|
|
5
|
-
}
|
|
6
|
-
return phasOwn.call(Object(object), property);
|
|
7
|
-
}
|
|
8
|
-
/*#__PURE__*/
|
|
9
|
-
export function isSupported() {
|
|
10
|
-
return 'hasOwn' in Object && typeof Object.hasOwn === 'function';
|
|
11
|
-
}
|
|
12
|
-
/*#__PURE__*/
|
|
13
|
-
export function isPolyfilled() {
|
|
14
|
-
return Object.hasOwn === objectHasOwn;
|
|
15
|
-
}
|
|
16
|
-
export function apply() {
|
|
17
|
-
if (!isSupported()) {
|
|
18
|
-
Object.defineProperty(Object, 'hasOwn', {
|
|
19
|
-
value: objectHasOwn,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=object-hasown.js.map
|
package/lib/object-hasown.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-hasown.js","sourceRoot":"","sources":["../src/object-hasown.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAA;AAC/C,MAAM,UAAU,YAAY,CAAC,MAAe,EAAE,QAAqB;IACjE,IAAI,MAAM,IAAI,IAAI,EAAE;QAClB,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;KAClE;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAA;AAC/C,CAAC;AAQD,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,CAAA;AAClE,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,MAAM,KAAK,YAAY,CAAA;AACvC,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE;YACtC,KAAK,EAAE,YAAY;YACnB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAA;KACH;AACH,CAAC"}
|