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

@getnumra/svelte

v1.0.0

Published

Svelte store and components for Numra. Calls your own backend — never holds an API key.

Readme

@getnumra/svelte

A debounced phone-check store and a risk badge for Svelte, talking to your own backend.

npm version npm downloads licence: MIT

The browser half, Svelte-shaped. Calls your backend — it never holds a Numra API key and cannot be made to.

npm install @getnumra/svelte

Works on Svelte 4 and 5. The store is a classic store rather than runes, so it needs no compiler and ties you to neither version.

You need the other half first

This package talks to an endpoint you mount yourself, with one of: @getnumra/express, @getnumra/fastify, @getnumra/next, @getnumra/nuxt, numra/laravel, or Numra\Handlers in plain PHP. That endpoint holds the key.

Numra reads a shared fraud ledger, so a key in a bundle is a key in everyone's hands. There is no apiKey option here, and a test fails the build if one ever appears.

Use it

<script>
  import { onDestroy } from 'svelte';
  import { createNumraCheck, RiskBadge } from '@getnumra/svelte';

  let phone = '';
  const check = createNumraCheck();

  $: check.set(phone);
  onDestroy(() => check.destroy());
</script>

<input bind:value={phone} inputmode="tel" />
<RiskBadge check={$check.data} loading={$check.isLoading} showScore />

$: check.set(phone) runs on every keystroke — that is fine, the store debounces. onDestroy is not optional: without it a timer outlives the component.

What it does that a plain fetch would not

  • Debounces. Every lookup is billable, and a reactive statement fires on every character.
  • Aborts the superseded request rather than ignoring it.
  • Drops a late answer by identity, not by catching AbortError. An abort landing while res.json() is still running does not always throw, and the operator would be shown the verdict for a number they already changed.
  • Clears the verdict when the field is cleared.

All of that lives in @getnumra/browser, shared with the React, Vue and Angular packages, so the four cannot drift apart.

Reading the result

riskScore alone cannot tell a checked-and-clean customer from a complete stranger — both come back low. On a cash-on-delivery store most buyers are new, so RiskBadge renders an unrated number as “No history”, never “Low risk”, and a blacklisted number as “Blacklisted” even when its band says something milder.

Passing it down

import { readonlyCheck } from '@getnumra/svelte';
export const view = readonlyCheck(check);   // no set, no refetch

Handing a child component the full store hands it the ability to spend your quota.

Errors

$check.error is a NumraRequestError carrying the code your own endpoint returned: NUMRA_NOT_CONFIGURED, FORBIDDEN, QUOTA_EXCEEDED, UPSTREAM_UNAVAILABLE. Branch on .code, not on the message.

SvelteKit

The component ships as .svelte source and your bundler compiles it, which is why this package has no build step. The svelte export condition is what points SvelteKit at the source — without it, esbuild is handed a template and fails. It renders on the server too; there is a test for that.

Release notes

Every release is tagged and written up on the Releases page. The same history in one file is in CHANGELOG.md.

Contributing

Bug reports and patches are welcome. CONTRIBUTING.md covers running the tests, the regression test a change is expected to bring with it, and which repository a given fix actually belongs in.

Security

Vulnerabilities go privately to the address in SECURITY.md. Do not open a public issue for a security problem — a public report is a working exploit for every merchant running the released version until a fix ships.

The rest of the family

Twelve packages, one contract. The server side holds the API key; the browser side calls the endpoint the server side mounts.

Server:

| Package | Repository | |---|---| | @getnumra/core | numra-js-core | | @getnumra/express | numra-express | | @getnumra/fastify | numra-fastify | | @getnumra/next | numra-next | | @getnumra/nuxt | numra-nuxt | | numra/numra-php | numra-php | | numra/laravel | numra-laravel |

Browser:

| Package | Repository | |---|---| | @getnumra/browser | numra-browser | | @getnumra/react | numra-react | | @getnumra/vue | numra-vue | | @getnumra/svelte | numra-svelte — this repo | | @getnumra/angular | numra-angular |

Documentation for all of them is at numra.ma/docs.

Licence

MIT