@openxmldev/linq-to-xml
Version:
LINQ to XML for TypeScript
25 lines • 720 B
JavaScript
/**
* @author Thomas Barnekow
* @license MIT
*/
import { getNodes } from '../internal.js';
/**
* For the elements contained in the source sequence, returns the concatenated
* sequences of child nodes of such elements in document order.
*
* @typeParam T The type of the elements contained in the source sequence.
* @returns The concatenated, flat sequence of child nodes in document order.
*/
export function nodes(source) {
return getManyNodes(source);
}
function* getManyNodes(source) {
for (const root of source) {
if (root) {
for (const node of getNodes(root)) {
yield node;
}
}
}
}
//# sourceMappingURL=nodes.js.map