Types

str()

opts()

eventModeBoolean defaults to false, if true readable state buffers are not filled and no 'data', but 'feed' and 'entry' events are emitted.

charsetstr() | 'UTF-8' | 'ISO-8859-1' An optional string to specify the encoding of input data. In the common use case you received this string in the headers of your HTTP response before you began parsing. If you, not so commonly, cannot provide the encoding upfront, pickup tries to detect the encoding, and eventually defaults to 'UTF-8'. The charset option is corresponding to the optional charset MIME type parameter found in Content-Type HTTP headers. It's OK to pass any string, pickup will fall back on 'UTF-8' when confused.

url()

An undefined property, not populated by the parser, to identify feeds and entries in upstream systems, without prompting V8 to create new hidden classes.

feed()

authorstr()

copyrightstr()

idstr()

imagestr()

languagestr()

linkstr()

originalURLurl()

paymentstr()

subtitlestr()

summarystr()

titlestr()

ttlstr()

updatedstr()

urlurl()

enclosure()

lengthstr()

typestr()

urlstr()

entry()

authorstr()

durationstr()

enclosureenclosure() or undefined

idstr()

imagestr()

linkstr()

originalURLurl()

subtitlestr()

summarystr()

titlestr()

updatedstr()

urlurl()

Event:'feed'

feed()

Emitted when the meta information of the feed gets available.

Event:'entry'

entry()

Emitted for each entry.

Exports

pickup(opts())

pickup exports a function that returns a Transform stream which emits newline separated JSON strings, in objectMode the 'data' event contains entry() or feed() objects. As per XML's structure the last 'data' event usually contains the feed() object. In eventMode neither 'readable' nor 'data' events are emitted, instead 'feed' and 'entry' events are fired.