Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rhcp/heading_hash_wasm

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhcp/heading_hash_wasm

A WebAssembly build of the Mimir heading_hash transform, suitable for use in Nodejs and browsers.

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
4
Weekly downloads
 
Created
Source

WebAssembly build of the heading_hash transform

This is a WebAssembly build of the heading_hash transform, suitable for use in Nodejs and browsers.

Initial setup

Install wasm-pack.

The wasm-pack site recommends curling into your shell to install, but I prefer using cargo:

cargo install wasm-pack

Once wasm-pack is installed, you can build, test, and publish this package.js

🛠️ Build with

Build for nodejs:

make build_node

Build for web:

make build_web

Default is a release build with optimizations and no debug info. Add --dev for a debug build.

wasm-pack build docs

Using the nodejs package

Add the dependency:

npm i @rhcp/heading_hash_wasm

Import & use it:

import * as headingHash from "@rhcp/heading_hash_wasm";

console.log(headingHash.transform(#hello"));

Using the web package

npm i @rhcp/heading_hash_wasm_web

Import the package, initialize it, and log a transformed string.

import { default as init, transform } from "@rhcp/heading_hash_wasm_web";
await init();
console.log(transform("#hello"))

Please note that this example assumes you have a bundler which will resolve the name @rhcp/heading_hash_wasm_web.

🔬 Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox

wasm-pack test docs

FAQs

Package last updated on 30 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc