coinnames
Simple module to return a crypto-currency's name from symbol or vice-versa.
Last updated 2 years ago by unibtc .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coinnames 
SYNC missed versions from official npm registry.

coinnames

Simple module to return a crypto-currency's name from symbol or vice-versa.

This module uses a predefined lists of coins on the file coins.json which where taken from coinmarketcap.com

Install

npm install coinnames --save

API

options -optional, accepts the value lower, default: undefined

checkAndUpdate(true) -forces a new update of the coin list from coinmarketcap

getName(symbol,opts) -gets the coin name from the specified symbol

getSymbol(name,opts) -gets the coin symbol from the specified name

Usage

var {getName,getSymbol} = require('coinnames')

var btc = getName('BTC')
console.log(btc) // Bitcoin

var ltc = getName('LTC','lower')
console.log(ltc) // litecoin

var litecoin = getSymbol('Litecoin')
console.log(litecoin) // LTC

var bitcoin = getSymbol('Bitcoin', 'lower')
console.log(bitcoin) // btc

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |