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

short-base16

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

short-base16

This library uses Unicode to shorten base16 strings into half their length and also provides functionality to unshorten them.

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
0
Created
Source

Short Base16

Description

This library uses Unicode to shorten base16 strings into half their length and also provides functionality to unshorten them.

Installation

To install the library, use npm:

npm install short-base16

Usage

Shorten a Base16 String

To shorten a base16 string, use the shortenBase16 function:

import { shortenBase16 } from 'short-base16';

const base16String = "48656c6c6f20576f726c64"; // "Hello World" in base16
const shortened = shortenBase16(base16String);
console.log(shortened); // Outputs the shortened Unicode string

Unshorten a Base16 String

To unshorten a base16 string, use the unshortenBase16 function:

import { unshortenBase16 } from 'short-base16';

const shortBase16String = "Hello World"; // Example shortened string
const unshortened = unshortenBase16(shortBase16String);
console.log(unshortened); // Outputs the original base16 string

Scripts

  • build: Compiles the TypeScript code to JavaScript.

Author

Patiparnne Vongchompue

License

ISC

Keywords

  • base16
  • shorten
  • short base16
  • unicode
  • utf

Keywords

base16

FAQs

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