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

This implements basic capability de/serialization

License

Notifications You must be signed in to change notification settings

primea/js-primea-capability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This implements basic capability de/serialization

Resources

License

Stars

Watchers

Forks

Packages

No packages published