JSPM

pull-nets

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q33084F
  • License MIT

a pull-stream interface for the `require('nets')` npm module

Package Exports

  • pull-nets

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-nets) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pull-nets

A small pull-stream interface that makes the nets npm module into a source. For making GET request in the browser or on the server.

install

npm i pull-nets

usage

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.