Skip to content

IanRamosC/metric.js

Repository files navigation

Metric.js

Lightweight easy-to-use library for unit of measurement conversion.

Metric.js

Build Status

What is love Metric?

Metric.js is a lightweight library that provides an easy way to convert units of measurement.

Installation

$ npm install --save metricjs

or

<script src="./js/metric.min.js"></script>

Usage

// If you're using node
const metric = require("metricjs")

let birthday = new Date("1995-03-01T00:00:00Z").getTime()

let age = metric.milliseconds(Date.now() - birthday).toYears() // 21.38...

You can find the full documentation here

License

MIT © Ian Ramos