Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

uuid-v4-wasm

tmtmtoo23MIT0.5.0TypeScript support: included

An uuid(v4) generator with WebAssembly.

rust, wasm-bindgen, uuid, WebAssembly

readme

uuid-v4-wasm CircleCI

An uuid(v4) generator library with WebAssembly.

  • This library supports both typescript and flowtype.
  • This library supports both node.js and browser.

Install

$ npm install uuid-v4-wasm

node.js

Usage

const wasm = require('uuid-v4-wasm')
const uuid = wasm.uuid()
console.log(uuid)

browser

Requirements

  • webpack >=4

Note: add .wasm extension to webpack config file

  resolve: {
    extensions: ['.js', '.wasm'],

Usage

import('uuid-v4-wasm')
    .then(wasm => wasm.uuid())
    .then(uuid => console.log(uuid))