yukikaze-bot / erlpack

Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@yukikaze-bot/erlpack

A encoder and decoder utility.

GitHub npm bundle size npm

Table of Contents

Description

Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for JavaScript.

Features

  • Written in TypeScript
  • Offers CommonJS, ESM bundles
  • Fully tested
  • Powered by C++

Installation

yarn add @yukikaze-bot/erlpack
# npm install @yukikaze-bot/erlpack
# pnpm add @yukikaze-bot/erlpack

Usage

Note: While this section uses require, the imports match 1:1 with ESM imports. For example const { pack } = require('@yukikaze-bot/erlpack') equals import { pack } from '@yukikaze-bot/erlpack'.

Note: When using ESM syntax you can also default-import pack function: import pack from '@yukikaze-bot/erlpack'.

Basic Usage

const { pack, unpack } = require('@yukikaze-bot/erlpack');
const packed = pack('Hello, World!');

console.log(unpack(packed));

API Documentation

For the full API documentation please refer to the TypeDoc generated documentation.

About

Erlpack is a fast encoder and decoder for the Erlang Term Format (version 131) for JavaScript.

License:Apache License 2.0


Languages

Language:C++ 39.2%Language:TypeScript 35.0%Language:C 23.2%Language:JavaScript 1.8%Language:Python 0.8%