metricjs
v1.0.1
Published
A unit of measurement converter for javascript
Downloads
10
Maintainers
Readme
Metric.js
Lightweight easy-to-use library for unit of measurement conversion.
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