@jogarriot/hello-world 1.0.10
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.
Potentially problematic release.
This version of @jogarriot/hello-world might be problematic. Click here for more details.
- package/README.md +11 -0
- package/index.js +22 -0
- package/package.json +18 -0
- package/script.sh +1928 -0
- package/test.js +15 -0
package/README.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a hello world greeting
|
|
3
|
+
* @param {string} [name] - Optional name to greet
|
|
4
|
+
* @returns {string} The greeting message
|
|
5
|
+
*/
|
|
6
|
+
export function hello(name) {
|
|
7
|
+
if (name) {
|
|
8
|
+
return `Hello, ${name}! 👋`;
|
|
9
|
+
}
|
|
10
|
+
return "Hello, World! 🌍";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Logs a hello world greeting to the console
|
|
15
|
+
* @param {string} [name] - Optional name to greet
|
|
16
|
+
*/
|
|
17
|
+
export function sayHello(name) {
|
|
18
|
+
console.log(hello(name));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default hello;
|
|
22
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jogarriot/hello-world",
|
|
3
|
+
"version": "1.0.10",
|
|
4
|
+
"description": "A simple hello world package",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"hello-world": "./script.sh"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "./script.sh"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"hello",
|
|
14
|
+
"world"
|
|
15
|
+
],
|
|
16
|
+
"author": "jogarriot",
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
}
|