Skip to content

Commit 059f13c

Browse files
committed
docs: update method descriptions to latest changes
1 parent 0a14070 commit 059f13c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ expect(reducedNode.schema).to.deep.eq({
752752
753753
### toDataNodes
754754

755-
`each` iterates over each data-item (_object_, _array_ and _value_) and emits the data-item, schema and location to a callback.
755+
`toDataNodes` collects all data-items (_object_, _array_ and _value_) and return them as a list:
756756

757757
```ts
758758
type DataNode = { pointer: string; value: unknown; node: SchemaNode };
@@ -788,7 +788,7 @@ expect(calls).to.deep.equal([
788788

789789
### toSchemaNodes
790790

791-
`eachSchema` emits each sub-schema definition to a callback. A sub-schema is any schema-definition like in `properties["property"]`, `anyOf[1]`, `contains`, `$defs["name"]`, etc.
791+
`toSchemaNodes` collects all sub-schema definitions, like in `properties["property"]`, `anyOf[1]`, `contains`, `$defs["name"]`, etc. and returns them as a list:
792792

793793
```ts
794794
const nodes: SchemaNode[] = compileSchema(mySchema).toSchemaNodes();

0 commit comments

Comments
 (0)