Binance Format
This project was developed to assist in formatting the binance symbols to better represent values in both the backend and front end. No api is used to query and perform the formatting, it is purely done with string manipulation to have more performance and availability.
Installation
NPM
npm install @clubinvestbr/format --save
YARN
yarn add @clubinvestbr/format
Getting started
Format
const { format } = require('@clubinvestbr/binance-format');
format("BTCETH");
// "BTC/ETH"
format("BTCUSDT");
// "BTC/USDT"
format("BTCWAVES");
// "BTC/WAVES"
Unformat
const { unformat } = require('@clubinvestbr/binance-format');
unformat("BTC/ETH");
// "BTCETH"
unformat("BTC/USDT");
// "BTCUSDT"
unformat("BTC/WAVES");
// "BTCWAVES"