bacon-stream
readable stream of bacon ipsum content from baconipsum.com
Usage
var bacon = ; // pipe to stdout;
Methods
;
Creates a new bacon-stream
with the specified options. If options are not specified the defaults will be used:
type: 'meat-and-filler' // 'all-meat' for meat only paras: 5 // number of paragraphs sentences: 0 // number of sentences (overrides paragraphs) startWithLorem: false // start first paragraph with 'Bacon ipsum dolor sit amet' https: false // https://baconipsum.com/api/
Shorthand to set just type
:
; // {type: 'all-meat'}
Shorthand to set just paras
:
; // {paras: 10}
;
Adds another request to the queue using the specified options.
bacon;
Adds another request to the queue using the specified options.
Note that om()
and nom()
return this
so they can be chained to build up a queue of varying deliciousness:
;
The example above will make 3 API requests to baconipsum.com.
Install
npm install bacon-stream
License: MIT