0.1.1 • Published 4 years ago

grex.js-test2 v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Grex.js

About

Grex.js is a library that bindings Rust grex library to Node.js and the browser.

Original library: https://github.com/pemistahl/grex.

Grex.js has built-in TypeScript support.

Installation

Via npm:

npm i grex.js

Via yarn:

yarn add grex.js

Via pnpm:

pnpm i grex.js

Usage

Usage with native module (default export)

Import the function by named import with ES6 modules syntax:

import { buildRegex } from "grex.js";

Import the grexJS library wrapper with ES6 modules syntax:

import grexJS from "grex.js";

Import the grexJS library wrapper with require function:

const grexJS = require("grex.js"); // not recommended way with TypeScript
// In that case grexJS constant have any type.

Usage with wasm

Import the function by named import with ES6 modules syntax:

import { load } from "grex.js/wasm/(node|browser)";

Import the grexJS library wrapper with ES6 modules syntax:

import load from "grex.js/wasm/(node|browser)";

Import the grexJS library wrapper with require function:

const load = require("grex.js/wasm/(node|browser)"); // not recommended way with TypeScript
// In that case grexJS constant have any type.

Usage of AMD, Commonjs and System version of the library

If you would like to use one this version u have to specify import by passing module type to import name. Example:

const load = require("grex.js/native/index-(commonjs|amd|system).js");

or

const load = require("grex.js/wasm/(node|browser)/index-(commonjs|amd|system).js");
0.1.1

4 years ago

0.1.0

4 years ago