UNPKG

measure-convert

Version:

JS/TS package for managing units of measurement. Convert, add, subtract, multiply, divide, and compare units of measurement.

23 lines (22 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnitPower = void 0; // src/units/UnitPower.ts const Unit_1 = require("./Unit"); class UnitPower extends Unit_1.Unit { constructor(name, symbol, description, baseUnitConversionFactor) { super(name, symbol, description, baseUnitConversionFactor); } } exports.UnitPower = UnitPower; UnitPower.watts = new UnitPower("Watts", "W", "Base unit of measure for power", 1); UnitPower.milliwatts = new UnitPower("Milliwatts", "mW", "0.001 watts", 0.001); UnitPower.microwatts = new UnitPower("Microwatts", "µW", "0.000001 watts", 0.000001); UnitPower.nanowatts = new UnitPower("Nanowatts", "nW", "1e-9 watts", 1e-9); UnitPower.picowatts = new UnitPower("Picowatts", "pW", "1e-12 watts", 1e-12); UnitPower.femtowatts = new UnitPower("Femtowatts", "fW", "1e-15 watts", 1e-15); UnitPower.kilowatts = new UnitPower("Kilowatts", "kW", "1000 watts", 1000); UnitPower.megawatts = new UnitPower("Megawatts", "MW", "1000000 watts", 1000000); UnitPower.gigawatts = new UnitPower("Gigawatts", "GW", "1e9 watts", 1e9); UnitPower.terawatts = new UnitPower("Terawatts", "TW", "1e12 watts", 1e12); UnitPower.horsepower = new UnitPower("Horsepower", "hp", "745.7 watts", 745.7);