
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
unit-mutation
Advanced tools
Simple lightweight conversion library for temperature, mass, speed, and length
A lightweight javascript conversion library for translating temperature, speed, mass and length values.
Note: The numbers are rounded up to the nearest 4th decimal point
Install using bower or npm:
bower install conversion.js
npm install conversion.js
Then load up a node console and try it out:
var convert = require('conversion.js');
// or load a script tag if using in the client
convert(1, 'mps').toKph();
convert(2, 'kilograms').toMetricTons()
convert(2, 'yards', { precision: 2 }).toCentimeters()
// Temperature
.toCelsius
.toFahrenheit
.toKelvin
// Length
.toKilometers
.toMeters
.toCentimeters
.toMillimeters
.toMiles
.toYards
.toInches
.toFeet
.toNauticalMiles
// Mass
.toMetricTons
.toKilograms
.toGrams
.toMilligrams
.toMcgs
.toLongTons
.toShortTons
.toStones
.toPounds
.toOunces
// Speed
.toMph // Miles per hour
.toFps // Feet per second
.toMps // Meters per second
.toKph // To kilometers per hour
.toKnot // To Knot
{
precision: 4 // The decimal cutoff point at where it is rounded up
}
Conversion.js is freely distributable under the terms of the MIT license.
FAQs
Simple lightweight conversion library for temperature, mass, speed, and length
We found that unit-mutation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.