khuzma-npm 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 +20 -0
- package/package.json +13 -0
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// String methods
|
|
2
|
+
function toUpper(str) {
|
|
3
|
+
return str.toUpperCase();
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
function toLower(str) {
|
|
7
|
+
return str.toLowerCase();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Number method
|
|
11
|
+
function add(a, b) {
|
|
12
|
+
return a + b;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Export all functions
|
|
16
|
+
module.exports = {
|
|
17
|
+
toUpper,
|
|
18
|
+
toLower,
|
|
19
|
+
add
|
|
20
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "khuzma-npm",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Simple string and math utility functions",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node index.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": ["string", "math", "utility", "javascript"],
|
|
11
|
+
"author": "Astro Khuzma",
|
|
12
|
+
"license": "MIT"
|
|
13
|
+
}
|