Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakeburden/pull-nets
a pull-stream interface for the `require('nets')` npm module
https://github.com/jakeburden/pull-nets
Last synced: 17 days ago
JSON representation
a pull-stream interface for the `require('nets')` npm module
- Host: GitHub
- URL: https://github.com/jakeburden/pull-nets
- Owner: jakeburden
- Created: 2017-06-08T03:01:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T03:10:56.000Z (over 7 years ago)
- Last Synced: 2025-01-07T23:29:58.224Z (17 days ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# pull-nets
A small pull-stream interface that makes the [nets](https://github.com/maxogden/nets) npm module into a source.
For making GET request in the browser or on the server.## install
```
npm i pull-nets
```## usage
```js
var nets = require('pull-nets')
var pull = require('pull-stream')pull(
nets('https://scuttlebutt.nz'),
pull.drain(function (buf) {
console.log(buf.toString())
})
)
```### note
the nature of `nets` is to return a buffer. so the source isn't really
streaming, it runs once and returns a buffer into memory.