part-2---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/1.index.js +1 -0
- package/2.write.js +5 -0
- package/3.index.js +3 -0
- package/4.export.js +3 -0
- package/5.dependency.js +6 -0
- package/6.development.js +3 -0
- package/7.hello.js +6 -0
- package/8.number.js +17 -0
- package/npm-library/index.js +11 -0
- package/npm-library/package.json +12 -0
- package/package.json +27 -0
package/1.index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.info("Hello world");
|
package/2.write.js
ADDED
package/3.index.js
ADDED
package/4.export.js
ADDED
package/5.dependency.js
ADDED
package/6.development.js
ADDED
package/7.hello.js
ADDED
package/8.number.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { first } from "lodash";
|
|
2
|
+
|
|
3
|
+
export const min = (first, second) => {
|
|
4
|
+
if (first < second) {
|
|
5
|
+
return first;
|
|
6
|
+
} else {
|
|
7
|
+
return second;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const max = (first, second) => {
|
|
12
|
+
if (first > second) {
|
|
13
|
+
return first;
|
|
14
|
+
} else {
|
|
15
|
+
return second;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "npm-library-elhamabdussalam",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Belajar NodeJS NPM Library",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"author": "M Elham Abdussalam",
|
|
11
|
+
"license": "ISC"
|
|
12
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "part-2---npm",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "1.index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"run": "node 1.index.js",
|
|
7
|
+
"prestart": "echo 'Before Application Start'",
|
|
8
|
+
"start": "node 1.index.js",
|
|
9
|
+
"poststart": "echo 'After Application Start'",
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./1.index.js",
|
|
14
|
+
"./number": "./8.number.js"
|
|
15
|
+
},
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"description": "",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"lodash": "^4.17.23",
|
|
22
|
+
"npm-library-elhamabdussalam": "^1.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"moment": "^2.30.1"
|
|
26
|
+
}
|
|
27
|
+
}
|