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
Click to show internal directories.
Click to hide internal directories.