UNPKG

@thepassle/axobject-query

Version:

Programmatic access to information about the AXObject Model

10 lines (9 loc) 345 B
import iteratorProxy from "./iteratorProxy.js"; export default function iterationDecorator(collection, entries) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Object.defineProperty(collection, Symbol.iterator, { value: iteratorProxy.bind(entries), }); } return collection; }