Have ideas to improve npm?Join in the discussion! »

This version has been deprecated

Author message:

next major versions provide non-blocking API

node-weakauras-parser
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

node-weakauras-parser

Installation

npm install node-weakauras-parser
# or 
yarn add node-weakauras-parser

The package is pre-built for the following environments:

OS Node 8 Node 10 Node 12 Node 13
Linux glibc (x64) ✔️ ✔️ ✔️ ✔️
Linux musl-libc (x64) ✔️ ✔️ ✔️ ✔️
macOS (x64) ✔️ ✔️ ✔️ ✔️
Windows (x64) ✔️ ✔️ ✔️ ✔️

If you use something else, you will need Rust and zlib in order to build from source code.

Usage

const parser = require('node-weakauras-parser');
 
const source = { test: 1 };
const encoded = parser.encode(source);
const decoded = parser.decode(encoded);
 
console.log(JSON.stringify(source) === JSON.stringify(decoded));

Please note that when arrays are involved, encoding them is lossy:

const parser = require('node-weakauras-parser');
 
const source = { test: [true, false] };
const encoded = parser.encode(source);
const decoded = parser.decode(encoded);
 
// Prints "{ test: { 1: true, 2: false } }"
console.log(decoded);

License

The project is licensed under MIT License, unless stated otherwise in a source file.

Install

npm i [email protected]

Version

1.0.5

License

MIT

Unpacked Size

95.6 kB

Total Files

31

Last publish

Collaborators

  • avatar