Skip to content

Commit

Permalink
add yxml.forEach method - closes #421
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Apr 23, 2022
1 parent 14c14de commit 1c9c97f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/types/YXmlFragment.js
Expand Up @@ -404,6 +404,15 @@ export class YXmlFragment extends AbstractType {
return typeListSlice(this, start, end)
}

/**
* Executes a provided function on once on overy child element.
*
* @param {function(YXmlElement|YXmlText,number, typeof this):void} f A function to execute on every element of this YArray.
*/
forEach (f) {
typeListForEach(this, f)
}

/**
* Transform the properties of this type to binary and write it to an
* BinaryEncoder.
Expand Down

0 comments on commit 1c9c97f

Please sign in to comment.