complex-utils-ensigna 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.
- package/index.js +23 -0
- package/package.json +13 -0
package/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function suma(a, b) {
|
|
2
|
+
return a + b;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function resta(a, b) {
|
|
6
|
+
return a - b;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function multiplicar(a, b) {
|
|
10
|
+
return a * b;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function dividir(a, b) {
|
|
14
|
+
if (b === 0) throw new Error("No se puede dividir por 0");
|
|
15
|
+
return a / b;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = {
|
|
19
|
+
suma,
|
|
20
|
+
resta,
|
|
21
|
+
multiplicar,
|
|
22
|
+
dividir
|
|
23
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "complex-utils-ensigna",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Paquete npm con funciones complejas y útiles",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node index.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": ["utils", "math", "complex"],
|
|
11
|
+
"author": "ensigna",
|
|
12
|
+
"license": "MIT"
|
|
13
|
+
}
|