npm-liblary-test-emil 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/index.js +11 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ export const sayHello = (name) => {
2
+ return `Hello, ${name}!`;
3
+ };
4
+
5
+ export const sum = (numbers) => {
6
+ let total = 0;
7
+ for (const number of numbers) {
8
+ total += number;
9
+ }
10
+ return total;
11
+ };
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "npm-liblary-test-emil",
3
+ "version": "1.0.0",
4
+ "description": "Belajar membuat npm library",
5
+ "license": "ISC",
6
+ "author": "Emil Ferdinan Akbar",
7
+ "type": "module",
8
+ "main": "index.js",
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ }
12
+ }