Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperstream

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperstream

stream html into html at a css selector

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
746
decreased by-6.4%
Maintainers
1
Weekly downloads
 
Created
Source

hyperstream

stream html into html at a css selector

build status

example

var hyperstream = require('hyperstream');
var fs = require('fs');

var hs = hyperstream({
    '#a': fs.createReadStream(__dirname + '/a.html'),
    '#b': fs.createReadStream(__dirname + '/b.html')
});
var rs = fs.createReadStream(__dirname + '/index.html');
rs.pipe(hs).pipe(process.stdout);
$ node example/hs.js
<html>
  <body>
    <div id="a"><h1>a!!!</h1></div>
    <div id="b"><b>bbbbbbbbbbbbbbbbbbbbbb</b></div>
  </body>
</html>

methods

var hyperstream = require('hyperstream')

var hs = hyperstream(streamMap)

Return a duplex stream that takes an html stream as input and produces an html stream as output, inserting the streams given by streamMap at the css selector keys.

If streamMap values are strings or functions, update the contents at the css selector key with their contents directly without using a stream.

hs.select(), hs.update(), hs.replace(), hs.remove()

Proxy through methods to the underlying trumpet instance.

install

With npm do:

npm install hyperstream

license

MIT

Keywords

FAQs

Package last updated on 23 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc