UNPKG

@dmgt/google-ad-manager-api

Version:
28 lines 692 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.iterate = iterate; const paginate_1 = require("./paginate"); /** * Iterate through results of possibly inifite, paginated queries. * * @see {@link PaginateOptions} * @see {@link paginate} * @example * ``` * for await (const item of iterate({ * executeQuery: (limit, offset) => * query( * client, * 'getLineItemsByStatementAsync', * { limit, offset } * ) * })) { * console.info(item) * } * ``` */ async function* iterate(options) { for await (const { items } of (0, paginate_1.paginate)(options)) yield* items; } //# sourceMappingURL=iterate.js.map