Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crypto-converter-lt

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypto-converter-lt

A nodejs crypto currency converter library that doesn't require subscribing to any API calls.

  • 1.0.0-alpha.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by1066.67%
Maintainers
1
Weekly downloads
 
Created
Source

NodeJS Crypto Converter

Build Status Known Vulnerabilities supported node versions codecov license: MIT Maintainability npm version npm

A minimal crypto crypto converter library for NodeJS that works out of the box.

Getting started

Installation

This package can be installed using npm

npm install crypto-converter-lt

or, yarn

yarn add crypto-converter-lt

Usage

Import crypto-converter-lt.

const CC = require('crypto-converter-lt')

Then instantiate with either the empty constructor

let cryptoConverter = new CC()

Or, with a json object

let cryptoConverter = new CC({from:"BTC", to:"ETH", amount:100})

The convert method will return the conversion based on the last conversion rate and can be used as a promise.

cryptoConverter.convert().then((response) => {
    console.log(response) //or do something else
})

convert can also take the amount as a parameter.

cryptoConverter.convert(100).then((response) => {
    console.log(response) //or do something else
})

To find the rates use the rates method.

cryptoConverter.rates().then((response) => {
    console.log(response) //or do something else
})

Chaining is also supported.

cryptoConverter.from("LTC").to("ETH").amount(125).convert().then((response) => {
    console.log(response) //or do something else
})

Issues

If any issues are found, they can be reported here.

License

This project is licensed under the MIT license.

Keywords

FAQs

Package last updated on 25 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc