Power¶
Representation of power. Returns objects created by amounts.
const { power } = require('abstract-things/values');
// With no unit - watt is the default unit
const v = power(200);
console.log(v.value);
console.log(v.hp); // convert to horsepower
console.log(v.watt); // convert to watts
// With a unit
console.log(power(1, 'hp'));
// String (with our without unit)
console.log(power('200 W'));
Units¶
Unit | SI | Names |
---|---|---|
Watt | Yes | w , W , watt |
Horsepower | No | hp , horsepower |