Base conversion CLI and API, using either a JS or a C++ implementation.
- JS implementation
- C++ Implementation
- C++ compiler toolchain
- node-gyp
- Node.js modules
- Clone source
npm install
- To use C++ implementations:
npm run build
$ base from to data implementation
from
and to
are bases to convert between, input
is the data to convert and implementation
is a known implementation (js, cpp). from
, to
and data
are required. implementation
is optional, defaults to cpp.
Example:
$ base 2 10 "0101001101010101" js
base = require('base')
base.api(from, to, input, implementation)
from
and to
are bases to convert between, input
is the data to convert and implementation
is a known implementation (js, cpp). from
, to
and data
are required. implementation
is optional, defaults to cpp.
Example:
base.api(10, 16, 255, 'js')
base[from][implementation][to](input)
from
and to
are bases to convert between, input
is the data to convert and implementation
is a known implementation (js, cpp).
Example:
base[10]['cpp'][16](255)
npm run local_test