Have ideas to improve npm?Join in the discussion! »

    nucos

    1.3.6 • Public • Published

    Nucos (NOAA Unit Conversion for Oil Spills)

    Used for converting temperature, volume, and mass.

    Basic Usage

    Convert when the unit types are the same:

    nucos.convert(unitType, fromUnit, toUnit, value)
    

    Example:

    nucos.convert("Density", "API degree", "kg/m^3", 10)
    

    Convert between different quantities (volume and mass)

    Instantiate the OilQuantityConverter off of nucos

    var oilConverter = new nucos.OilQuantityConverter();
    

    Use the Convert method off of the OilQuantityConverter class

    oilConverter.Convert(fromAmount, fromUnit, Density, DensityUnits, toUnit);
    

    Example with inputs:

    oilConverter.Convert(50, "tons", 10, "API degree", "cubic meters");
    

    Install

    npm i nucos

    DownloadsWeekly Downloads

    12

    Version

    1.3.6

    License

    MIT

    Unpacked Size

    35.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar