conversioncalc 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/conv.js +22 -0
  2. package/package.json +13 -0
package/conv.js ADDED
@@ -0,0 +1,22 @@
1
+ function meterToCm(m) {
2
+ return m * 100;
3
+ }
4
+ function meterToKm(m) {
5
+ return m / 1000;
6
+ }
7
+ function cmToKm(cm) {
8
+ return cm / 100000;
9
+ }
10
+ function celsiusToFahrenheit(c) {
11
+ return (c * 9/5) + 32;
12
+ }
13
+ function fahrenheitToCelsius(f) {
14
+ return (f - 32) * 5/9;
15
+ }
16
+ module.exports = {
17
+ meterToCm,
18
+ meterToKm,
19
+ cmToKm,
20
+ celsiusToFahrenheit,
21
+ fahrenheitToCelsius
22
+ };
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "conversioncalc",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "conv.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs"
13
+ }