Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@ethernauta/utils

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethernauta/utils

[![bundlejs](https://deno.bundlejs.com/badge?q=@ethernauta/utils&treeshake=[*])](https://deno.bundlejs.com/?q=@ethernauta/utils&treeshake=[*])

Source
npmnpm
Version
0.0.43
Version published
Weekly downloads
588
130.59%
Maintainers
1
Weekly downloads
 
Created
Source

bundlejs

Philosophy

This module is a set of small, dependency-free utilities used across the other packages. It is intentionally generic — nothing here knows about Ethereum, chains, or transactions.

Modules

API

camel_to_kebab

import { camel_to_kebab } from "@ethernauta/utils"

const kebab = camel_to_kebab("helloWorld") // "hello-world"

invariant

import { invariant } from "@ethernauta/utils"

const input: string | null = "helloWorld"
invariant(typeof input === "string", "input must be a string")
// input is narrowed to `string` from here on

number_to_hex

import { number_to_hex } from "@ethernauta/utils"

const hex = number_to_hex(255) // "0xff"

hex_to_number

import { hex_to_number } from "@ethernauta/utils"

const value = hex_to_number("0xff") // 255

bytes_to_hex

import { bytes_to_hex } from "@ethernauta/utils"

const hex = bytes_to_hex(new Uint8Array([0xde, 0xad, 0xbe, 0xef]))
// "0xdeadbeef"

hex_to_bytes

import { hex_to_bytes } from "@ethernauta/utils"

const bytes = hex_to_bytes("0xdeadbeef")
// Uint8Array([0xde, 0xad, 0xbe, 0xef])

strip_hex_prefix

import { strip_hex_prefix } from "@ethernauta/utils"

const stripped = strip_hex_prefix("0xdeadbeef") // "deadbeef"

FAQs

Package last updated on 19 May 2026

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