Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Latest commit

 

History

History
69 lines (40 loc) · 2.47 KB

README.md

File metadata and controls

69 lines (40 loc) · 2.47 KB

SYNOPSIS

NPM Package Build Status Coverage Status

js-standard-style

This implements basic capability de/serialization

INSTALL

npm install primea-capability

USAGE

const Capability = require('primea-capability')
const id = Buffer.alloc(20)
const cap = new Capability(id, 5)

constructor

index.js:12-19

creates a new capability given the path of the process creating it and a "tag"

Parameters

  • path Array<Buffer>
  • tag Integer (optional, default 0)
  • funIndex (optional, default 0)

serialize

index.js:25-32

Serializes the capability

Returns Buffer

deserialize

index.js:39-42

Deserializes a Buffer and returns a new instance of Capability

Parameters

Returns Object

deserializeFromPipe

index.js:49-59

Deserializes a capability from a buffer-pipe and returns a new instance of Capability

Parameters

  • p Pipe

Returns Object

LICENSE

MPL-2.0