grw.mod.js

command
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

grw.mod.js is the package for go-reader-writer (GRW) that is built as a JavaScript module. In modern JavaScript, the module can be imported using destructuring assignment. The functions are defined in the Exports variable in the grwjs package.

Usage

// Below is a simple set of examples of how to use this package in a JavaScript application.

// load functions into current scope
const { read, write, algorithms, schemes } = require('./dist/grw.global.min.js);

// Open a reader for a given uri and compression algorithm.
// Returns an object, which can be destructured to the configured reader and error as a string.
// If there is no error, then err will be null.
var { reader, err } = read(uri, algorithm, options);

// Open a writer for a given uri and compression algorithm..
// Returns an object, which can be destructured to the configured writer and error as a string.
// If there is no error, then err will be null.
var { writer, err } = write(uri, algorithm, options);

References

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL