0.0.11 • Published 7 years ago

capacity-unit-converter v0.0.11

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
7 years ago

Capacity Unit Converter

This is a basic Typescript utility helping out converting capacity between base 10 values like TeraByte and base 2 values like TebiByte.

Consuming the package

#!Typescript

import { CapacityConverter, CapacityUnit } from "capacity-unit-converter";

let converter: CapacityConverter = new CapacityConverter();
let capacity: number = 1;
let sourceUnits: CapacityUnit = CapacityUnit.TeraByte;
let targetUnits: CapacityUnit = CapacityUnit.TebiByte;
converter.convert(capacity, sourceUnits, targetUnits).then((result) => {
  console.log("I Converted = " + result); // = "I Converted = 0.9095"
});
0.0.11

7 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago