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

@lacspace/sdk

v2.0.4

Published

High-level TypeScript SDK for Lacspace — api, auth, analytics and e-commerce in one client.

Readme

@lacspace/sdk

One client for the whole Lacspace platform — auth, analytics, e-commerce and raw API, sharing a single connection.

npm version install size minzipped types license

Not sure which package to use? Start here. The SDK bundles @lacspace/api, @lacspace/auth and @lacspace/analytics behind one client — so a login token instantly applies to every call — and adds e-commerce helpers on top.

  • 🎯 One instance, one token — sign in once, everything's authenticated
  • ⚡ Zero dependencies · 🌍 isomorphic · 📦 ESM + CJS · fully typed

Install

npm  install @lacspace/sdk      # or pnpm add / yarn add / bun add

Quick start

import { LacspaceSDK } from "@lacspace/sdk";

const lac = new LacspaceSDK({ baseURL: "https://api.lacspace.com/api" });

// 1 · Authenticate — the token is stored and reused everywhere
const { user } = await lac.auth.login({ email: "[email protected]", password: "••••••••" });

// 2 · E-commerce helpers
const products = await lac.ecommerce.getProducts();
await lac.ecommerce.addToCart({ productId: products[0]!.id, quantity: 1 });
const { orderId } = await lac.ecommerce.checkout("cart_123");

// 3 · Track what happened
await lac.analytics.track("checkout_completed", { orderId });

What's on the client

lac.auth        // login, register, me, logout, refresh
lac.analytics   // track, queueEvent, flush, batch
lac.ecommerce   // getProducts, getProduct, addToCart, checkout
lac.api         // the raw typed client for any endpoint

Because they share one api instance, lac.auth.login() authenticates analytics and ecommerce too — automatically.

Recipes

A tiny React login hook

import { useState } from "react";
import { LacspaceSDK, LacspaceApiError } from "@lacspace/sdk";

const lac = new LacspaceSDK({ baseURL: "https://api.lacspace.com/api" });

export function useLogin() {
  const [error, setError] = useState<string>();
  async function login(email: string, password: string) {
    try {
      const { user } = await lac.auth.login({ email, password });
      return user;
    } catch (e) {
      setError(e instanceof LacspaceApiError && e.status === 401 ? "Invalid credentials" : "Something went wrong");
    }
  }
  return { login, error };
}

Building in React? @lacspace/react gives you useAuth, useQuery and a provider out of the box.

Anything the helpers don't cover → drop to the raw client

const invoices = await lac.api.get("billing/invoices");
await lac.api.post("support/tickets", { subject: "Help" });

Server-side with an API key

const lac = new LacspaceSDK({ baseURL, apiKey: process.env.LACSPACE_API_KEY });

One import for everything

Every type and class from api, auth and analytics is re-exported here:

import { LacspaceSDK, LacspaceApi, LacspaceAuth, LacspaceAnalytics, LacspaceApiError } from "@lacspace/sdk";
import type { Product, LacspaceUser, AnalyticsEvent } from "@lacspace/sdk";

The Lacspace family

| Package | For | | --- | --- | | @lacspace/sdk | Everything in one client (this package) | | @lacspace/api | The core HTTP client | | @lacspace/auth | Login, register, tokens | | @lacspace/analytics | Event tracking | | @lacspace/react | React hooks | | @lacspace/nepali-date | Bikram Sambat dates | | @lacspace/nepali-utils | Nepal helpers |

Licensing

This package is free under the Lacspace Free Licence — MIT-equivalent freedoms. Use it in personal and commercial projects at no cost; just keep the notice.

Not every Lacspace package is free. We also offer Commercial (paid), Client-specific, and Private (proprietary) packages under separate terms. See the full Lacspace Licence Centre.


Part of the Lacspace ecosystem — 35 zero-dependency, isomorphic TypeScript packages.

All packages ↗ · npm org ↗ · Licence Centre ↗ · GitHub ↗