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

@fulcro/types

v1.0.0

Published

Numeric types with a defined range and layout: fixed-width integers, half, single and double precision floats, and a decimal128 Decimal.

Readme

@fulcro/types

Numeric types with a declared range and layout: fixed-width integers, half, single and double precision floats, an integer of any size, and a Decimal with the semantics of IEEE 754 decimal128. Nothing to configure: every operation is a typed method.

npm install @fulcro/types
import { Decimal, SignedInteger, UnsignedInteger } from '@fulcro/types';

const Int32 = SignedInteger(32);

Int32.add(Int32.from(2), Int32.from(3)); // 5
Int32.add(Int32.maximum, Int32.from(1)); // RangeError: FULCRO6031: … outside [-2147483648, 2147483647]
UnsignedInteger(8).wrap(-1); // 255, when modular arithmetic is what you mean

Decimal.from('0.1').add(Decimal.from('0.2')).toString(); // '0.3'
Decimal.from('19.99').multiply(Decimal.from(3)).toString(); // '59.97'

| Type | What it is | | -------------------------------------------- | -------------------------------------------------- | | SignedInteger<N>, UnsignedInteger<N> | 8 to 128 bits, checked arithmetic, wrap | | HalfPrecisionFloat, SinglePrecisionFloat | binary16 and binary32, each operation rounded once | | DoublePrecisionFloat | binary64, the number named as a choice | | BigInteger | an integer of any size | | Decimal | 34 decimal digits, five rounding modes |

Each type has a value of the same name that converts, recognises and computes, and every type but BigInteger reports its minimum and maximum. If you only need the types, import type them and no code is loaded.

The JavaScript operators are the language's own: a + b on two SignedInteger<32> is a plain, unchecked number, and on a Decimal it throws. Use the methods, which keep the type and its checks.

Every type but BigInteger declares a size and alignment, which sizeOf<T>() and alignOf<T>() from @fulcro/reflect read at compile time.

Structs

Value types with a fixed layout, built from the types above and from each other — frozen, compared by field, and stored in a DataView without an object per value:

import { SinglePrecisionFloat, struct, type Struct } from '@fulcro/types';

const Vector3 = struct('Vector3', {
	x: SinglePrecisionFloat,
	y: SinglePrecisionFloat,
	z: SinglePrecisionFloat,
});
type Vector3 = Struct<typeof Vector3>;

Vector3.layout.size; // 12, and sizeOf<Vector3>() at compile time
Vector3.write(view, 0, Vector3.from({ x: 0, y: 1, z: 0 }));

Full guide: docs/types.md — ranges, rounding, the special values, the layout table and structs. 🇧🇷 Leia em português.