Skip to main content

Built and signed on GitHub Actions

UserHub JavaScript SDK

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
82%
Published
4 months ago (0.6.4)

UserHub JavaScript SDK

npm Latest Version JSR Latest Version

The official UserHub JavaScript SDK.

Stability: alpha

Requirements

  • Node 18 or later
  • Deno 1.28 or later
  • Bun 1 or later

Getting Started

Install SDK

npm install @userhub/sdk

Example

import { AdminApi } from "@userhub/sdk";

const adminApi = new AdminApi("sk_123");

const res = await adminApi.users.list({ pageSize: 5 });

for (const user of res.users) {
  console.log(user.id, user.displayName);
}

See the examples directory for more examples.

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@userhub/sdk

Import symbol

import * as mod from "@userhub/sdk";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@userhub/sdk";

Add Package

npx jsr add @userhub/sdk

Import symbol

import * as mod from "@userhub/sdk";

Add Package

yarn dlx jsr add @userhub/sdk

Import symbol

import * as mod from "@userhub/sdk";

Add Package

pnpm dlx jsr add @userhub/sdk

Import symbol

import * as mod from "@userhub/sdk";

Add Package

bunx jsr add @userhub/sdk

Import symbol

import * as mod from "@userhub/sdk";