Open URLs from stdin in the browser.
$ echo http://github.com | browser-pipe
browser-pipe
forwards stdin to stdout, thus the original output is not modified:
$ ecstatic / | browser-pipe
ecstatic serving / at http://0.0.0.0:8000
Open the first N
links instead of all links. With the leading -
, open the last N
links.
$ curl "http://api.duckduckgo.com/?q=unicorn&format=xml&pretty=1" | browser-pipe -n2
Print URLs that would be opened, but do not open them.
Returns a writable stream.
Note: a single URL must not be split across multiple chunks of data in order to be recognized by this module. This is intentional. Open an issue if there is a legitimate use case where this property does not hold.
Type: Number
Default: Infinity
If positive or zero, serves as the upper bound on the number of URLs to open.
If negative, gives the index of the first URL to print, counting from the end.
Type: function(url)
Default: opn
URL opener.
npm install browser-pipe
MIT