uuid-v4-wasm

An uuid(v4) generator with WebAssembly.

Usage no npm install needed!

<script type="module">
  import uuidV4Wasm from 'https://cdn.skypack.dev/uuid-v4-wasm';
</script>

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))