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

@inpulse-ui/utils

v1.0.0

Published

Inpulse UI Utilities

Readme

@inpulse-ui/utils

Coverage

An ever expanding utility library to help you deliver confident ecommerce and SaaS projects.

Installation

pnpm add @inpulse-ui/utils
# or
bun add @inpulse-ui/utils
# or
yarn add @inpulse-ui/utils
# or
npm install @inpulse-ui/utils

About Amount

The Amount utility can help you deal with monetary values when you're in a context of ecommerce stores, ERPs and simple reports. This utility converts all numbers to Int (cents) and is fast, simple and precise.

But if you're dealing with large numbers, complex calculations, compound interest and crypto currency, you'll be in better hands using libraries like Dinero.js or Big.js.

Convert method

The convert method inside Amount should consider a ratio value much like the ones exposed by common exchange APIs. For instance, here's one by Fixer:

{
    "success": true,
    "timestamp": 1519296206,
    "base": "EUR",
    "date": "2025-09-25",
    "rates": {
        "AUD": 1.566015,
        "CAD": 1.560132,
        "CHF": 1.154727,
        "CNY": 7.827874,
        "GBP": 0.882047,
        "JPY": 132.360679,
        "USD": 1.23396,
    [...]
    }
}

Before using convert, you should fetch the ratios for a given currency and then, pass the proper value to the function.

import { amount } from '@inpulse-ui/utils';

const ratios = {
  "base": "EUR",
  "rates": {
    "USD": 1.23396
  }
};
const { rates } = ratios;
const value = amount.set(19.99, 'EUR');
const targetValue = amount.convert(value, 'USD', rates['USD']);

Other services like FastForex, ExchangeRatiosAPI and Open Exchange Rates offer a similar API response and should work properly with our function.

Documentation

Visit https://ui.inpulse.cx/utils/getting-started to view the documentation.

License

Licensed under the MIT license.