Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 967 Bytes

README.md

File metadata and controls

42 lines (27 loc) · 967 Bytes

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