UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

36 lines (35 loc) 720 B
import { indexedProxyGetTrap as f, mapIteratorFactory as m } from "./helpers.js"; import { truthify as o } from "../../../utils/value/bool.js"; import { isFunction as a, isNumber as c } from "../../../utils/value/is.js"; import { structFrom as d, struct as h } from "../../../utils/struct/main.js"; const l = Object.freeze( h({ [Symbol.iterator]: { value() { return m.call(this); } }, map: { value(t, n) { return [...m.call(this, t, n)]; } } }) ), u = (t, n) => a(t) ? u( { length: { get: t } }, n ) : c(t) ? u( { length: { value: t } }, n ) : new Proxy(d(l, t), { get: f(n), set: o }); export { u as createIndexed, u as default };