ask-ascii
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

ask-ascii

ASCII Conversions.

  • Characters to Integers (convertToAscii)
  • Integers to Characters (convertIntegerToChar)

Installation using npm and setting up

npm i ask-ascii

Setting Up

const { convertToAscii, convertIntegerToChar } = require("ask-ascii");

Usage

Function Name 🤖 Parameters ⚗ Return type 🎁
convertToAscii 🔡➡🔢 A String An array of all the ASCII codes corresponding to the character indices
convertIntegerToChar 🔢➡🔡 Any Number Of Integers Returns the corresponding ASCII character in the order to arguments

Code Snippets

const { convertToAscii, convertIntegerToChar } = require("ask-ascii");

console.log(convertToAscii("HI"));
//[ 72, 73]

let checkAscii = convertToAscii("HI!");
console.log(...checkAscii); // 72 73

console.log(convertIntegerToChar(72, 73));
// HI

let checkCharCode = convertIntegerToChar(72, 73);
console.log(...checkCharCode); // HI

Package Sidebar

Install

npm i ask-ascii

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

11.9 kB

Total Files

8

Last publish

Collaborators

  • dtech-dbug