@clubinvestbr/binance-format

Put mask for the symbols similar to the one in binance "ETH/BTC"

Usage no npm install needed!

<script type="module">
  import clubinvestbrBinanceFormat from 'https://cdn.skypack.dev/@clubinvestbr/binance-format';
</script>

README

Latest Version GitHub last commit npm downloads

NPM

Build Status Coverage Status CodeCov Codacy Badge Codacy Badge

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"