Skip to content

Commit

Permalink
Add api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
baspeeters committed Jan 31, 2020
1 parent 8574d02 commit 32f7c0e
Show file tree
Hide file tree
Showing 171 changed files with 22,422 additions and 77 deletions.
167 changes: 92 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const ounces = grams.to.Ounce();
```

### Math operations

#### Example
```javascript
import {Kilogram, TroyOunce} from "measurement-toolkit";

Expand All @@ -33,6 +35,15 @@ kgs.subtract(toz);
> }
```

#### API
* [add()](./docs/classes/_unit_.unit.md#add)
* [divideBy()](./docs/classes/_unit_.unit.md#divideby)
* [dividedBy()](./docs/classes/_unit_.unit.md#dividedby)
* [multiply()](./docs/classes/_unit_.unit.md#multiply)
* [percentageOf()](./docs/classes/_unit_.unit.md#percentageof)
* [percentageOfThis()](./docs/classes/_unit_.unit.md#percentageofthis)
* [subtract()](./docs/classes/_unit_.unit.md#subtract)

## Unit support

<table>
Expand All @@ -45,109 +56,109 @@ kgs.subtract(toz);
<td rowspan="3">Mass</td>
<td colspan="2">SI</td>
<td>
<code>Kilogram</code>,
<code>Attogram</code>,
<code>Centigram</code>,
<code>Decagram</code>,
<code>Decigram</code>,
<code>Exagram</code>,
<code>Femtogram</code>,
<code>Gigagram</code>,
<code>Gram</code>,
<code>Hectogram</code>,
<code>Megagram</code>,
<code>Microgram</code>,
<code>Milligram</code>,
<code>Nanogram</code>,
<code>Petagram</code>,
<code>Picogram</code>,
<code>Teragram</code>,
<code>Yoctogram</code>,
<code>Yottagram</code>,
<code>Zeptogram</code>,
<code>Zettagram</code>
<a href="./docs/classes/_mass_si_yoctogram_.yoctogram.md">Yoctogram</a>,
<a href="./docs/classes/_mass_si_zeptogram_.zeptogram.md">Zeptogram</a>,
<a href="./docs/classes/_mass_si_attogram_.attogram.md">Attogram</a>,
<a href="./docs/classes/_mass_si_femtogram_.femtogram.md">Femtogram</a>,
<a href="./docs/classes/_mass_si_picogram_.picogram.md">Picogram</a>,
<a href="./docs/classes/_mass_si_nanogram_.nanogram.md">Nanogram</a>,
<a href="./docs/classes/_mass_si_microgram_.microgram.md">Microgram</a>,
<a href="./docs/classes/_mass_si_milligram_.milligram.md">Milligram</a>,
<a href="./docs/classes/_mass_si_centigram_.centigram.md">Centigram</a>,
<a href="./docs/classes/_mass_si_decigram_.decigram.md">Decigram</a>,
<a href="./docs/classes/_mass_si_gram_.gram.md">Gram</a>,
<a href="./docs/classes/_mass_si_decagram_.decagram.md">Decagram</a>,
<a href="./docs/classes/_mass_si_hectogram_.hectogram.md">Hectogram</a>,
<a href="./docs/classes/_mass_si_kilogram_.kilogram.md">Kilogram</a>,
<a href="./docs/classes/_mass_si_megagram_.megagram.md">Megagram</a>,
<a href="./docs/classes/_mass_si_gigagram_.gigagram.md">Gigagram</a>,
<a href="./docs/classes/_mass_si_teragram_.teragram.md">Teragram</a>,
<a href="./docs/classes/_mass_si_petagram_.petagram.md">Petagram</a>,
<a href="./docs/classes/_mass_si_exagram_.exagram.md">Exagram</a>,
<a href="./docs/classes/_mass_si_zettagram_.zettagram.md">Zettagram</a>,
<a href="./docs/classes/_mass_si_yottagram_.yottagram.md">Yottagram</a>,
</td>
</tr>
<tr>
<td rowspan="2">US</td>
<td>Avoirdupois</td>
<td>
<code>Dram</code>,
<code>Grain</code>,
<code>Hundredweight</code>,
<code>Ounce</code>,
<code>Pound</code>,
<code>Quarter</code>,
<code>AvoirdupoisTon</code>
<a href="./docs/classes/_mass_us_avoirdupois_grain_.grain.md">Grain</a>,
<a href="./docs/classes/_mass_us_avoirdupois_dram_.dram.md">Dram</a>,
<a href="./docs/classes/_mass_us_avoirdupois_ounce_.ounce.md">Ounce</a>,
<a href="./docs/classes/_mass_us_avoirdupois_quarter_.quarter.md">Quarter</a>,
<a href="./docs/classes/_mass_us_avoirdupois_hundredweight_.hundredweight.md">Hundredweight</a>,
<a href="./docs/classes/_mass_us_avoirdupois_pound_.pound.md">Pound</a>,
<a href="./docs/classes/_mass_us_avoirdupois_avoirdupoiston_.avoirdupoiston.md">AvoirdupoisTon</a>,
</td>
</tr>
<tr>
<td>Troy</td>
<td>
<code>TroyOunce</code>,
<code>TroyPound</code>
<a href="./docs/classes/_mass_us_troy_troyounce_.troyounce.md">TroyOunce</a>,
<a href="./docs/classes/_mass_us_troy_troypound_.troypound.md">TroyPound</a>,
</td>
</tr>
<tr>
<td>Length</td>
<td colspan="2">SI</td>
<td>
<code>Kilometer</code>,
<code>Attometer</code>,
<code>Centimeter</code>,
<code>Decameter</code>,
<code>Decimeter</code>,
<code>Exameter</code>,
<code>Femtometer</code>,
<code>Gigameter</code>,
<code>Meter</code>,
<code>Hectometer</code>,
<code>Megameter</code>,
<code>Micrometer</code>,
<code>Millimeter</code>,
<code>Nanometer</code>,
<code>Petameter</code>,
<code>Picometer</code>,
<code>Terameter</code>,
<code>Yoctometer</code>,
<code>Yottameter</code>,
<code>Zeptometer</code>,
<code>Zettameter</code>
<a href="./docs/classes/_length_si_yoctometer_.yoctometer.md">Yoctometer</a>,
<a href="./docs/classes/_length_si_zeptometer_.zeptometer.md">Zeptometer</a>,
<a href="./docs/classes/_length_si_attometer_.attometer.md">Attometer</a>,
<a href="./docs/classes/_length_si_femtometer_.femtometer.md">Femtometer</a>,
<a href="./docs/classes/_length_si_picometer_.picometer.md">Picometer</a>,
<a href="./docs/classes/_length_si_nanometer_.nanometer.md">Nanometer</a>,
<a href="./docs/classes/_length_si_micrometer_.micrometer.md">Micrometer</a>,
<a href="./docs/classes/_length_si_millimeter_.millimeter.md">Millimeter</a>,
<a href="./docs/classes/_length_si_centimeter_.centimeter.md">Centimeter</a>,
<a href="./docs/classes/_length_si_decimeter_.decimeter.md">Decimeter</a>,
<a href="./docs/classes/_length_si_meter_.meter.md">Meter</a>,
<a href="./docs/classes/_length_si_decameter_.decameter.md">Decameter</a>,
<a href="./docs/classes/_length_si_hectometer_.hectometer.md">Hectometer</a>,
<a href="./docs/classes/_length_si_kilometer_.kilometer.md">Kilometer</a>,
<a href="./docs/classes/_length_si_megameter_.megameter.md">Megameter</a>,
<a href="./docs/classes/_length_si_gigameter_.gigameter.md">Gigameter</a>,
<a href="./docs/classes/_length_si_terameter_.terameter.md">Terameter</a>,
<a href="./docs/classes/_length_si_petameter_.petameter.md">Petameter</a>,
<a href="./docs/classes/_length_si_exameter_.exameter.md">Exameter</a>,
<a href="./docs/classes/_length_si_zettameter_.zettameter.md">Zettameter</a>,
<a href="./docs/classes/_length_si_yottameter_.yottameter.md">Yottameter</a>,
</td>
</tr>
<tr>
<td rowspan="2">Time</td>
<td colspan="2">SI</td>
<td>
<code>Kilosecond</code>,
<code>Attosecond</code>,
<code>Centisecond</code>,
<code>Decasecond</code>,
<code>Decisecond</code>,
<code>Exasecond</code>,
<code>Femtosecond</code>,
<code>Gigasecond</code>,
<code>Second</code>,
<code>Hectosecond</code>,
<code>Megasecond</code>,
<code>Microsecond</code>,
<code>Millisecond</code>,
<code>Nanosecond</code>,
<code>Petasecond</code>,
<code>Picosecond</code>,
<code>Terasecond</code>,
<code>Yoctosecond</code>,
<code>Yottasecond</code>,
<code>Zeptosecond</code>,
<code>Zettasecond</code>
<a href="./docs/classes/_time_si_yoctosecond_.yoctosecond.md">Yoctosecond</a>,
<a href="./docs/classes/_time_si_zeptosecond_.zeptosecond.md">Zeptosecond</a>,
<a href="./docs/classes/_time_si_attosecond_.attosecond.md">Attosecond</a>,
<a href="./docs/classes/_time_si_femtosecond_.femtosecond.md">Femtosecond</a>,
<a href="./docs/classes/_time_si_picosecond_.picosecond.md">Picosecond</a>,
<a href="./docs/classes/_time_si_nanosecond_.nanosecond.md">Nanosecond</a>,
<a href="./docs/classes/_time_si_microsecond_.microsecond.md">Microsecond</a>,
<a href="./docs/classes/_time_si_millisecond_.millisecond.md">Millisecond</a>,
<a href="./docs/classes/_time_si_centisecond_.centisecond.md">Centisecond</a>,
<a href="./docs/classes/_time_si_decisecond_.decisecond.md">Decisecond</a>,
<a href="./docs/classes/_time_si_second_.second.md">Second</a>,
<a href="./docs/classes/_time_si_decasecond_.decasecond.md">Decasecond</a>,
<a href="./docs/classes/_time_si_hectosecond_.hectosecond.md">Hectosecond</a>,
<a href="./docs/classes/_time_si_kilosecond_.kilosecond.md">Kilosecond</a>,
<a href="./docs/classes/_time_si_megasecond_.megasecond.md">Megasecond</a>,
<a href="./docs/classes/_time_si_gigasecond_.gigasecond.md">Gigasecond</a>,
<a href="./docs/classes/_time_si_terasecond_.terasecond.md">Terasecond</a>,
<a href="./docs/classes/_time_si_petasecond_.petasecond.md">Petasecond</a>,
<a href="./docs/classes/_time_si_exasecond_.exasecond.md">Exasecond</a>,
<a href="./docs/classes/_time_si_zettasecond_.zettasecond.md">Zettasecond</a>,
<a href="./docs/classes/_time_si_yottasecond_.yottasecond.md">Yottasecond</a>,
</td>
</tr>
<tr>
<td colspan="2">Other</td>
<td>
<code>Minute</code>,
<code>Hour</code>,
<code>Day</code>
<a href="./docs/classes/_time_other_minute_.minute.md">Minute</a>,
<a href="./docs/classes/_time_other_hour_.hour.md">Hour</a>,
<a href="./docs/classes/_time_other_day_.day.md">Day</a>,
</td>
</tr>
</table>
Expand All @@ -158,6 +169,12 @@ kgs.subtract(toz);
npm i measurement-toolkit
```

## API Documentation

```
npm run build:docs
```

## Testing

### Run tests
Expand Down
93 changes: 93 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[measurement-toolkit](README.md)

# measurement-toolkit

## Index

### External modules

* ["BaseUnit"](modules/_baseunit_.md)
* ["DerivedUnit"](modules/_derivedunit_.md)
* ["Length"](modules/_length_.md)
* ["Length/SI/Attometer"](modules/_length_si_attometer_.md)
* ["Length/SI/Centimeter"](modules/_length_si_centimeter_.md)
* ["Length/SI/Decameter"](modules/_length_si_decameter_.md)
* ["Length/SI/Decimeter"](modules/_length_si_decimeter_.md)
* ["Length/SI/Exameter"](modules/_length_si_exameter_.md)
* ["Length/SI/Femtometer"](modules/_length_si_femtometer_.md)
* ["Length/SI/Gigameter"](modules/_length_si_gigameter_.md)
* ["Length/SI/Hectometer"](modules/_length_si_hectometer_.md)
* ["Length/SI/Kilometer"](modules/_length_si_kilometer_.md)
* ["Length/SI/Megameter"](modules/_length_si_megameter_.md)
* ["Length/SI/Meter"](modules/_length_si_meter_.md)
* ["Length/SI/Micrometer"](modules/_length_si_micrometer_.md)
* ["Length/SI/Millimeter"](modules/_length_si_millimeter_.md)
* ["Length/SI/Nanometer"](modules/_length_si_nanometer_.md)
* ["Length/SI/Petameter"](modules/_length_si_petameter_.md)
* ["Length/SI/Picometer"](modules/_length_si_picometer_.md)
* ["Length/SI/SiDerivedUnit"](modules/_length_si_siderivedunit_.md)
* ["Length/SI/Terameter"](modules/_length_si_terameter_.md)
* ["Length/SI/Yoctometer"](modules/_length_si_yoctometer_.md)
* ["Length/SI/Yottameter"](modules/_length_si_yottameter_.md)
* ["Length/SI/Zeptometer"](modules/_length_si_zeptometer_.md)
* ["Length/SI/Zettameter"](modules/_length_si_zettameter_.md)
* ["Mass"](modules/_mass_.md)
* ["Mass/SI/Attogram"](modules/_mass_si_attogram_.md)
* ["Mass/SI/Centigram"](modules/_mass_si_centigram_.md)
* ["Mass/SI/Decagram"](modules/_mass_si_decagram_.md)
* ["Mass/SI/Decigram"](modules/_mass_si_decigram_.md)
* ["Mass/SI/Exagram"](modules/_mass_si_exagram_.md)
* ["Mass/SI/Femtogram"](modules/_mass_si_femtogram_.md)
* ["Mass/SI/Gigagram"](modules/_mass_si_gigagram_.md)
* ["Mass/SI/Gram"](modules/_mass_si_gram_.md)
* ["Mass/SI/Hectogram"](modules/_mass_si_hectogram_.md)
* ["Mass/SI/Kilogram"](modules/_mass_si_kilogram_.md)
* ["Mass/SI/Megagram"](modules/_mass_si_megagram_.md)
* ["Mass/SI/Microgram"](modules/_mass_si_microgram_.md)
* ["Mass/SI/Milligram"](modules/_mass_si_milligram_.md)
* ["Mass/SI/Nanogram"](modules/_mass_si_nanogram_.md)
* ["Mass/SI/Petagram"](modules/_mass_si_petagram_.md)
* ["Mass/SI/Picogram"](modules/_mass_si_picogram_.md)
* ["Mass/SI/SiDerivedUnit"](modules/_mass_si_siderivedunit_.md)
* ["Mass/SI/Teragram"](modules/_mass_si_teragram_.md)
* ["Mass/SI/Yoctogram"](modules/_mass_si_yoctogram_.md)
* ["Mass/SI/Yottagram"](modules/_mass_si_yottagram_.md)
* ["Mass/SI/Zeptogram"](modules/_mass_si_zeptogram_.md)
* ["Mass/SI/Zettagram"](modules/_mass_si_zettagram_.md)
* ["Mass/US/Avoirdupois/AvoirdupoisTon"](modules/_mass_us_avoirdupois_avoirdupoiston_.md)
* ["Mass/US/Avoirdupois/Dram"](modules/_mass_us_avoirdupois_dram_.md)
* ["Mass/US/Avoirdupois/Grain"](modules/_mass_us_avoirdupois_grain_.md)
* ["Mass/US/Avoirdupois/Hundredweight"](modules/_mass_us_avoirdupois_hundredweight_.md)
* ["Mass/US/Avoirdupois/Ounce"](modules/_mass_us_avoirdupois_ounce_.md)
* ["Mass/US/Avoirdupois/Pound"](modules/_mass_us_avoirdupois_pound_.md)
* ["Mass/US/Avoirdupois/Quarter"](modules/_mass_us_avoirdupois_quarter_.md)
* ["Mass/US/Troy/TroyOunce"](modules/_mass_us_troy_troyounce_.md)
* ["Mass/US/Troy/TroyPound"](modules/_mass_us_troy_troypound_.md)
* ["Mass/US/UsDerivedUnit"](modules/_mass_us_usderivedunit_.md)
* ["Time"](modules/_time_.md)
* ["Time/Other/Day"](modules/_time_other_day_.md)
* ["Time/Other/Hour"](modules/_time_other_hour_.md)
* ["Time/Other/Minute"](modules/_time_other_minute_.md)
* ["Time/SI/Attosecond"](modules/_time_si_attosecond_.md)
* ["Time/SI/Centisecond"](modules/_time_si_centisecond_.md)
* ["Time/SI/Decasecond"](modules/_time_si_decasecond_.md)
* ["Time/SI/Decisecond"](modules/_time_si_decisecond_.md)
* ["Time/SI/Exasecond"](modules/_time_si_exasecond_.md)
* ["Time/SI/Femtosecond"](modules/_time_si_femtosecond_.md)
* ["Time/SI/Gigasecond"](modules/_time_si_gigasecond_.md)
* ["Time/SI/Hectosecond"](modules/_time_si_hectosecond_.md)
* ["Time/SI/Kilosecond"](modules/_time_si_kilosecond_.md)
* ["Time/SI/Megasecond"](modules/_time_si_megasecond_.md)
* ["Time/SI/Microsecond"](modules/_time_si_microsecond_.md)
* ["Time/SI/Millisecond"](modules/_time_si_millisecond_.md)
* ["Time/SI/Nanosecond"](modules/_time_si_nanosecond_.md)
* ["Time/SI/Petasecond"](modules/_time_si_petasecond_.md)
* ["Time/SI/Picosecond"](modules/_time_si_picosecond_.md)
* ["Time/SI/Second"](modules/_time_si_second_.md)
* ["Time/SI/SiDerivedUnit"](modules/_time_si_siderivedunit_.md)
* ["Time/SI/Terasecond"](modules/_time_si_terasecond_.md)
* ["Time/SI/Yoctosecond"](modules/_time_si_yoctosecond_.md)
* ["Time/SI/Yottasecond"](modules/_time_si_yottasecond_.md)
* ["Time/SI/Zeptosecond"](modules/_time_si_zeptosecond_.md)
* ["Time/SI/Zettasecond"](modules/_time_si_zettasecond_.md)
* ["Unit"](modules/_unit_.md)
Loading

0 comments on commit 32f7c0e

Please sign in to comment.