Socket
Book a DemoInstallSign in
Socket

@onbeam/utils

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onbeam/utils

A collection of useful utility functions and hooks which can be used fully standalone or along with the rest of the @onbeam packages. View all utils, hooks and variables [here](https://packages.onbeam.com/?path=/docs/utils-functions-absbigint--docs).

latest
npmnpm
Version
1.13.8
Version published
Maintainers
5
Created
Source

@onbeam/utils

A collection of useful utility functions and hooks which can be used fully standalone or along with the rest of the @onbeam packages. View all utils, hooks and variables here.

Table of Contents

Installation

Install the package using your preferred package manager:

npm install @onbeam/utils
# or
yarn add @onbeam/utils
# or
pnpm add @onbeam/utils

To keep all @onbeam packages updated, you can use the CLI:

npx @onbeam/cli update -d [directory]

Tree-Shaking Support

This package is fully tree-shakable, ensuring that only the utils, hooks and variables you import are included in your final bundle, optimizing your app's performance.

Examples

Example 1: Utility function usage

import { formatNumber } from "@onbeam/utils";

formatNumber(1234567); // "1.23M"
formatNumber(1234567, { maximumFractionDigits: 1 }); // "1.2M"

Example 2: Hook usage

import { useClipboard } from "@onbeam/utils";

const App = () => {
  const { onCopy, hasCopied } = useClipboard("Hello, World!");

  return <button onClick={onCopy}>{hasCopied ? "Copied!" : "Copy"}</button>;
};

For more examples, check out the docs of all individual utils, hooks and variables here.

All @onbeam packages

That's it! Happy coding! 🌈

FAQs

Package last updated on 07 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts