0.0.1 • Published 6 years ago

primea-capability v0.0.1

Weekly downloads
2
License
MPL-2.0
Repository
github
Last release
6 years ago

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:11-14

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

Parameters

  • id Buffer
  • tag Integer (optional, default 0)

serialize

index.js:20-25

Serializes the capability

Returns Buffer

deserialize

index.js:32-35

Deserializes a Buffer and returns a new instance of Capability

Parameters

Returns Object

deserializeFromPipe

index.js:42-46

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

Parameters

  • p Pipe

Returns Object

LICENSE

MPL-2.0