You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@ilihub/ascii

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ilihub/ascii

ASCII number system conversion typescript functions

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

@ilihub/ascii

ASCII number system conversion typescript functions

NPM Version NPM CodeFactor Socket Badge

Installation

# if you're using pnpm
pnpm add @ilihub/ascii

# or, if you're using npm
npm install @ilihub/ascii

# or, if you're using yarn
yarn add @ilihub/ascii

Usage

import { Ascii } from "@ilihub/ascii";

const ascii = new Ascii("Hello World");

const binary = ascii.toBinary();
console.log(binary); // 01001000011001010110110001101100011011110010110000100000011101110110111101110010011011000110010000100001

const decimal = ascii.toDecimal();
console.log(decimal); // [ 72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33 ]

const hexadecimal = ascii.toHexadecimal();
console.log(hexadecimal); // 48656C6C6F2C20776F726C6421

const octal = ascii.toOctal();
console.log(octal); // 110145154154157054040167157162154144041

Sponsors & Backers

Support the development of new open-source projects from ilihub through crowdfunding.

The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.

Sponsors

Keywords

ilihub

FAQs

Package last updated on 01 Nov 2023

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