oak-barrel

1.0.1 • Public • Published

oak-barrel

Build Status codecov npm Dependency Status devDependency Status

A barrel is a simple format for storing and transferring individual, variable-length binary objects within a byte array.

Getting Started

Install the oak-barrel package into your project with npm.

npm install oak-barrel --save

Use the oak-barrel module in your project.

import Barrel from 'oak-barrel'; // ES6
var Barrel = require('oak-barrel'); // ES5
 
// Convert from a String into a barrel-formatted Buffer
let barrel = Barrel.fromText('Hello, World!');
// <Buffer 48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 21 ff>
 
// Convert from a barrel-formatted Buffer into a String
let text = Barrel.toText(barrel);
// 'Hello, World!'

API

The public interface for oak-barrel is defined in the API Guide.

Contributing

Pull requests are welcome! To get started, see the Contributing Guide.

Readme

Keywords

Package Sidebar

Install

npm i oak-barrel

Weekly Downloads

1

Version

1.0.1

License

none

Last publish

Collaborators

  • trevinhofmann