1.0.0 โ€ข Published 3 years ago

ask-ascii v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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 StringAn array of all the ASCII codes corresponding to the character indices
convertIntegerToChar ๐Ÿ”ขโžก๐Ÿ”กAny Number Of IntegersReturns 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