Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

normcore

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normcore

No-config distributed streams using hypercore

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
1
-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

normcore stability

npm version build status test coverage downloads js-standard-style

No-config distributed streams using hypercore.

Usage

const normcore = require('normcore')

const feed1 = normcore('welcome-to-the-norm-zone')
const key = feed1.key.toString('hex')
feed1.append('hello')
feed1.append('this is norman')

const feed2 = normcore(key)
feed2.createReadStream().on('data', function (data) {
  console.log('feed2: ' + data.toString())
})

API

feed = normcore(key?)

Create a new normcore instance. Optionally takes a key to replicate from another feed

key = feed.key

Get the hypercore key. You probably usually want to turn it into a hex value:

const hypercore = require('hypercore')
const feed = normcore('omnormnormnormnorm')
console.log(feed.key.toString('hex'))

feed.append(data)

Write data into the feed

writeableStream = feed.createWriteableStream()

Create a new writeableStream you can write data to

readableStream = feed.createReadableStream()

Create a new readableStream you can read data from

Installation

$ npm install normcore

See Also

License

MIT

Keywords

hypercore

FAQs

Package last updated on 05 Nov 2016

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