ayomide 1.0.2

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 (3) hide show
  1. package/README.md +8 -0
  2. package/index.js +16 -0
  3. package/package.json +20 -0
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # My Awesome Package
2
+
3
+ A simple npm package that generates a greeting.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install ayomide
package/index.js ADDED
@@ -0,0 +1,16 @@
1
+ // index.js
2
+
3
+ /**
4
+ * Greets a person by name.
5
+ * @param {string} name - The name of the person.
6
+ * @returns {string} The greeting message.
7
+ */
8
+ function greet(name) {
9
+ if (typeof name !== "string") {
10
+ throw new TypeError("Name must be a string");
11
+ }
12
+ return `Hello, ${name}! Welcome to my awesome package.`;
13
+ }
14
+
15
+ // Export the function so other projects can use it
16
+ module.exports = greet;
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "ayomide",
3
+ "version": "1.0.2",
4
+ "description": "My first npm package",
5
+ "homepage": "https://github.com/ayscript/first_npm_package#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/ayscript/first_npm_package/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/ayscript/first_npm_package.git"
12
+ },
13
+ "license": "ISC",
14
+ "author": "Ayomide Olaleye",
15
+ "type": "commonjs",
16
+ "main": "index.js",
17
+ "scripts": {
18
+ "test": "echo \"Error: no test specified\" && exit 1"
19
+ }
20
+ }