2.0.1 • Published 3 years ago

mr.convert v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

⚡ Mr.convert

⚡ Mr.convert is a simple convert package

Installation :

  $ npm install mr.convert
  $ npm i mr.convert

Usage :

const convert = require("mr.convert");
const { convertCountriesCode } = require("mr.convert");
console.log(convertCountriesCode("MA")); //Output is : Morocco 
const convert = require("mr.convert");
const { convertTime } = require("mr.convert");
console.log(convertTime(1,{from : "h" , to : "m"})); //Output is : 60
const convert = require("mr.convert");
const { convertMoney } = require("mr.convert");
console.log(convertMoney(1,{from : "USD" , to : "AUD"})); //Output is : 1.34
const convert = require("mr.convert");
const { convertDistance } = require("mr.convert");
console.log(convertDistance(5,{from : "HM" , to : "KM"})); //Output is : 0.5
const convert = require("mr.convert");
const { convertDistance } = require("mr.convert");
console.log(convertDistance(5,{from : "HM" , to : "KM"})); //Output is : 0.5
const convert = require("mr.convert");
const { convertNumber } = require("mr.convert");
console.log(convertNumber(10000)); //Output is : 10k

ScreenShot :

convertCountriesCode convertTime convertMoney convertDistance convertNumber

Available Methods :

  • convert.convertCountriesCode("Code");
  • convert.convertTime("time" , "to");
  • convert.convertMoney(num,{from : "USD" , to : "AUD"});
  • convert.convertDistance(value , {from : "unit1" , to : "unit2"});
  • convert.convertNumber(number)

Exemple Methods :

  • convert.convertCountriesCode("MA");
  • convert.convertTime(1,{from : "h" , to:"m"});
  • convert.convertMoney(1,{from : "USD" , to : "AUD"});
  • convert.convertDistance(5 , {from : "HM" , to : "KM"});
  • convert.convertNumber(10000)

Convert Time Unit :

  • ms : milli-seconds
  • s : seconds
  • m : minutes
  • h : hours
  • d : days

News :

  • Added MAD in ConvertMoney Function

from : "EUR" , "USD" , "MAD"

Thx for +500 download <3