npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

yespower

v1.0.4

Published

Node.js bindings of the Yespower hashing algorithm

Downloads

30

Readme

Yespower for Node.js

NPM Version

Prerequisites

  • Node.js LTS

Install

$ yarn add yespower

Build

$ yarn

API

yespower(
    input: Buffer | Uint8Array,
    n?: number,                          // memory cost N (default 2048)
    r?: number,                          // block size r (default 32)
    pers?: string | Buffer | Uint8Array, // personality (default none)
    version?: 5 | 10,                    // 5 = YESPOWER_0_5, 10 = YESPOWER_1_0 (default)
): Buffer                                // 32-byte hash
  • pers accepts a string (UTF-8 encoded) or a Buffer / Uint8Array (used verbatim, so it is binary-safe and may contain NUL bytes).
  • version selects the algorithm variant; it defaults to 10 (YESPOWER_1_0) to preserve backward compatibility. Pass 5 for YESPOWER_0_5.

Asynchronous

yespower_async takes the same arguments and returns a Promise<Buffer>. It runs the (CPU-heavy) hash on the libuv threadpool so the Node.js event loop is not blocked, which lets you hash many inputs concurrently (e.g. with Promise.all). Inputs are copied, so the source Buffer may be reused or mutated immediately after the call. The Promise rejects on invalid parameters.

yespower_async(
    input: Buffer | Uint8Array,
    n?: number,
    r?: number,
    pers?: string | Buffer | Uint8Array,
    version?: 5 | 10,
): Promise<Buffer>

Example Code

import { yespower, yespower_async } from 'yespower';

const data = Buffer.from("7000000001e980924e4e1109230383e66d62945ff8e749903bea4336755c00000000000051928aff1b4d72416173a8c3948159a09a73ac3bb556aa6bfbcad1a85da7f4c1d13350531e24031b939b9e2b", "hex");

// YESPOWER_1_0, N=2048, r=32 (defaults)
console.log(yespower(data).toString('hex'));

// YESPOWER_0_5 with a personality (e.g. "Client Key")
console.log(yespower(data, 2048, 8, 'Client Key', 5).toString('hex'));

// Asynchronous (non-blocking) — hash several inputs concurrently
const hashes = await Promise.all([
    yespower_async(data),
    yespower_async(data, 2048, 8, 'Client Key', 5),
]);
console.log(hashes.map((h) => h.toString('hex')));