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

@rank-lang/provider-runtime

v0.3.1

Published

Shared provider runtime helpers for Rank host integrations

Readme

@rank-lang/provider-runtime

Shared JavaScript helpers for Rank provider processes.

Full documentation →

Install

npm install @rank-lang/provider-runtime

Entry points

  • @rank-lang/provider-runtime: provider protocol helpers plus deterministic RNG helpers
  • @rank-lang/provider-runtime/rand: deterministic RNG helpers only

API

Constants

  • STDLIB_RAND_ALGORITHM: stable identifier for the stdlib RNG algorithm (rank/rand/splitmix64@1)
  • PROVIDER_PROTOCOL_VERSION: current line-oriented provider protocol version

RNG helpers

  • encodeStdlibRandState(state: bigint): string
  • decodeStdlibRandState(stateText: string): bigint | undefined
  • stdlibRandSeedState(seed: number): bigint
  • stdlibRandDeriveState(parentState: bigint, label: string): bigint
  • stdlibRandNextUnitFloat(state: bigint): { value: number, state: bigint }
  • stdlibRandNextInt(state: bigint, min: bigint, max: bigint): { value: bigint, state: bigint }
  • stdlibRandChooseIndex(state: bigint, length: number): { index: number, state: bigint }

These helpers are the shared deterministic random source used by provider runtimes such as @rank-lang/plugin-faker.

Provider protocol helpers

  • initializeResult(namespace, error?)
  • invokeSuccess(requestId, output)
  • invokeError(requestId, code, message)
  • runNodeProviderLoop({ namespace, invoke })

runNodeProviderLoop reads newline-delimited JSON messages from stdin, enforces initialization before invocation, and writes protocol results to stdout.

Example

import { runNodeProviderLoop } from "@rank-lang/provider-runtime";

await runNodeProviderLoop({
  namespace: "demo",
  invoke(exportName, input) {
    if (exportName !== "Echo") {
      return {
        ok: false,
        code: "UnknownExport",
        message: `Unsupported export: ${String(exportName)}`,
      };
    }

    return {
      ok: true,
      output: input,
    };
  },
});

Development

npm run test -w @rank-lang/provider-runtime

Publishing

No build step is required for this package.

From the workspace root:

npm publish -w @rank-lang/provider-runtime