Parse OBO files from an input stream.
Emits a [Term] object stream or ndjson stream.
Members
(static) parse
Parse OBO 1.2 file
Methods
(static) terms(stream) → {stream}
Produce [Term]s object stream
Parameters:
Name | Type | Description |
---|---|---|
stream |
stream | stream from fs or www |
Returns:
object stream
- Type
- stream
(static) termsNdjson(stream) → {stream}
Produce [Term]s ndjson stream
Parameters:
Name | Type | Description |
---|---|---|
stream |
stream | strem from fs or www |
Returns:
ndjson stream
- Type
- stream
(inner) stanzaParser()
Parse one [Term] at once.
NOTE Although this parser is a stream, this function requires one term to be
stored in memory at once. How else to create an Object stream? One
could append a string until it is JSON.parse()''able, but that still requires
storing the object in memory at once, on the other side. Better to provide
an Object stream as well as an ndjson stream.