Dottle
AWS State Language to Graphviz DOT language
API
AsyncIterator
read(input, [options]) ⇒ Accepts a ReadableStream, an AsyncIterator, an array or a string and returns an AsyncIterator.
Kind: global function
Returns: AsyncIterator
- Returns an AsyncIterator which yields Promises which resolve to parsed data.
Param | Type | Description |
---|---|---|
input | ReadableStream | AsyncIterator | Array | string |
Raw input data |
[options] | Object |
Optional options object. |
Example
for await const result of console;// => digraph { a -> b }
WritableStream
readToStream(input, [options]) ⇒ Accepts a ReadableStream, an array or a string and returns a WritableStream. Stream output will be utf-8 text. Stream values will be delimited by a system-native newline escape character.
Kind: global function
Returns: WritableStream
- Returns a WritableStream Stream output will be utf-8 text. Stream values will be delimited by a system-native newline escape character.
Param | Type | Description |
---|---|---|
input | ReadableStream | AsyncIterator | Array | string |
Raw input data |
[options] | Object |
Optional options object. |
Example
;// => digraph { a -> b }
Promise
readOne(input, [options]) ⇒ Accepts a ReadableStream, an AsyncIterator, an array or a string and returns a Promise which resolves to the first value of the stream.
Kind: global function
Returns: Promise
- Returns a Promise which resolves to the first value of the stream.
Param | Type | Description |
---|---|---|
input | ReadableStream | AsyncIterator | Array | string |
Raw input data |
[options] | Object |
Optional options object. |
Example
console;// => digraph { a -> b }
Promise
readAll(input, [options]) ⇒ Accepts a ReadableStream, an AsyncIterator, an array or a string and returns a Promise which resolves to an array of all values.
Note: If a stream or iterator is passed to readAll
and it does not complete, the Promise returned by this function will never resolve.
Kind: global function
Returns: Promise
- Returns a Promise which resolves to an array of all values.
Param | Type | Description |
---|---|---|
input | ReadableStream | AsyncIterator | Array | string |
Raw input data |
[options] | Object |
Optional options object. |
Example
console;// => digraph { a -> b }
License
MIT