1.0.4 • Published 6 months ago

short-base16 v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

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
1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago