New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

basecraft

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basecraft

A simple base converter library

latest
Source
npmnpm
Version
1.0.10
Version published
Maintainers
0
Created
Source

Basecraft

basecraft is a lightweight, efficient, and intuitive library for converting numbers between different bases. Whether you're dealing with binary, decimal, hexadecimal, or custom bases, basecraft makes it easy.

Features

  • 🧮 Flexible Base Support: Convert numbers between any base (2-36).
  • Fast and Lightweight: Minimal dependencies for maximum performance.
  • 📦 Custom Base Alphabets: Define your own character sets for unique base systems.
  • 🛠️ Developer-Friendly API: Simple and clear methods for base conversions.

Installation

Install basecraft using npm:

npm install basecraft

or with yarn:

yarn add basecraft

##Usage Import the Package

const basecraft = require('basecraft');

// ES Module import
// import basecraft from 'basecraft';
const decimal = basecraft.convert('1010', 2, 10);
console.log(decimal); // Output: 10
const hex = basecraft.convert('255', 10, 16);
console.log(hex); // Output: ff

Keywords

math

FAQs

Package last updated on 12 Jan 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