npm.io
1.0.5 • Published 3 years ago

polygon-wedgit-base

Licence
MIT
Version
1.0.5
Deps
0
Size
12 kB
Vulns
0
Weekly
0

Super Base Converter

A package to convert numbers from one base to another.

Installation

To install the package, run the following command:

yarn add super-base-converter

Make sure you have Node.js and Yarn installed.

Usage

Import the BaseConverter class from the package:

import { BaseConverter } from 'super-base-converter';

Create an instance of BaseConverter:

const converter = new BaseConverter();
Converting from Base N to Decimal
const decimalNumber = converter.convertFromBaseNtoDecimal('1101', 2);
console.log(decimalNumber); // Output: 13
Converting from Decimal to Base N
const baseNNumber = converter.convertFromDecimalToBaseN(13, 2);
console.log(baseNNumber); // Output: '1101'

Documentation

To generate the documentation, make sure you have installed Typedoc and Serve by running the following command:

yarn add typedoc serve
Building the Documentation

Run the following command to build the documentation:

yarn build-docs

The documentation will be generated in the docs directory.

Serving the Documentation

To view the documentation locally, run the following command:

yarn serve-docs

This will start a local server at http://localhost:3000 to serve the documentation.

Contributing

Contributions are welcome! Please refer to the contribution guidelines for more information.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Happy base converting!

Keywords