This module written in JavaScript has the units and constants used everyday in High Energy Physics calculations.
HEPhys is based on CLHEP - A Class Library for High Energy Physics, which is written in C++. This HEPhys specifically presents the same units and constants that are defined in files PhysicalUnits.h and PhysicalConstants.h.
One way to use it is:
var HEP = require('hephys');
var radiuscircle = 3.4 * HEP.cm;
var perimeter = radiuscircle * HEP.twopi;
var area = Math.pow( radiuscircle, 2) * HEP.pi;
console.log( "area = %d cm2", area / HEP.cm2 );
console.log( "area = %d m2", area / HEP.m2 );
console.log( "perimeter = %d cm", perimeter / HEP.cm );
console.log( "perimeter = %d m", perimeter / HEP.m );