2.0.2 • Published 3 months ago
ts-text-converter v2.0.2
Text Converter
Effortlessly convert between decimal, char, hexadecimal, octal, and binary representations with this versatile JavaScript utility. Simplify your coding tasks and streamline your programming experience.
Instalation
First install Node.js. Then:
npm install ts-text-converter
# or
yarn add ts-text-converter
Importing
Using CommonJS require()
const convert = require('ts-text-converter');
Using ES6/TypeScript imports
import convert from 'ts-text-converter';
How to use
Example
const convert = require('ts-text-converter');
convert.binary.toDecimal("1000") // return 8
// or
const { binary } = require('ts-text-converter');
binary.toChar("01110100 01100101 01110011 01110100"); // return 'test'
Running Tests
To run the test suite, first install the dependencies:
npm install
# or
yarn
Then run:
npm test
# or
yarn test