Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including eufa with all npm packages installed. Try it out:

var eufa = require("eufa")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

eufa v0.1.0

A high efficient utility functions library written in webassembly.

Eufa

A high efficient utility functions library written in webassembly.

Use

# Install efua through npm
npm install eufa --save

Please move 'eufa-module.wasm' from node_modules to some place where you can fetch it by xhr call.

import eufa from 'eufa';

// Init eufa first
eufa.init('static/eufa-module.wasm', () => {
    console.log(eufa.Encryptor.base64_encode('Hello WebAssembly, hello Eufa :)'));
});

Build

Pre-requisite

Install Emscripten SDK from official installing website.

Commands

# Install dependencies;
npm install

# Build
npm run build;

# Run test;
npm run test

# Run benchmark test;
npm run benchmark

Dependencies

  • Chrome v58 or higher (headless supported)
  • Node v8.2.1
  • NPM v5.3.0
  • Gulp v3.9.1
  • Emsdk (emscripten v1.37.13)
  • Binaryen latest version

Classes

  • Math

Eufa.Math.i64_add<int, int>

Eufa.Math.f64_add<double, double>

Eufa.Math.i64_minus<int, int>

Eufa.Math.f64_minus<double, double>

Eufa.Math.i64_multiply<int, int>

Eufa.Math.f64_multiply<double, double>

Eufa.Math.i64_divide<int, int>

Eufa.Math.f64_divide<double, double>

Eufa.Math.i64_abs

Eufa.Math.f64_abs

Eufa.Math.i64_sqrt

Eufa.Math.f64_sqrt

  • String

Eufa.String.capitalize

  • Encryptor

Eufa.Encryptor.base64_encode

Eufa.Encryptor.base64_decode

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free