gst-common 1.0.0 → 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.
- package/README.md +1 -1
- package/bun.lockb +0 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +46 -0
- package/package.json +17 -5
- package/index.js +0 -3
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Say Hello
|
package/bun.lockb
ADDED
|
Binary file
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// src/functions.ts
|
|
2
|
+
function sayHello({ firstName, lastName, age }) {
|
|
3
|
+
const name = `${firstName} ${lastName}`;
|
|
4
|
+
const greeting = `Hello, ${name}!`;
|
|
5
|
+
if (age) {
|
|
6
|
+
return `${greeting}, are ${age} years old.`;
|
|
7
|
+
} else {
|
|
8
|
+
return greeting;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
sayHello
|
|
13
|
+
};
|
|
14
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
|
|
26
|
+
// src/index.ts
|
|
27
|
+
var index_exports = {};
|
|
28
|
+
__export(index_exports, {
|
|
29
|
+
sayHello: () => sayHello
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
|
+
|
|
33
|
+
// src/functions.ts
|
|
34
|
+
function sayHello({ firstName, lastName, age }) {
|
|
35
|
+
const name = `${firstName} ${lastName}`;
|
|
36
|
+
const greeting = `Hello, ${name}!`;
|
|
37
|
+
if (age) {
|
|
38
|
+
return `${greeting}, are ${age} years old.`;
|
|
39
|
+
} else {
|
|
40
|
+
return greeting;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
sayHello
|
|
46
|
+
});
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gst-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Store all common variables that we need",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
4
8
|
"type": "module",
|
|
5
|
-
"
|
|
6
|
-
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
7
13
|
"scripts": {
|
|
8
|
-
"
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"publish:npm": "npm publish",
|
|
16
|
+
"release": "npm run build && npm run publish:npm"
|
|
9
17
|
},
|
|
10
18
|
"repository": {
|
|
11
19
|
"type": "git",
|
|
@@ -19,5 +27,9 @@
|
|
|
19
27
|
"bugs": {
|
|
20
28
|
"url": "https://github.com/anhtu16122000/gst-common/issues"
|
|
21
29
|
},
|
|
22
|
-
"homepage": "https://github.com/anhtu16122000/gst-common#readme"
|
|
30
|
+
"homepage": "https://github.com/anhtu16122000/gst-common#readme",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"tsup": "^8.3.6",
|
|
33
|
+
"typescript": "^5.7.3"
|
|
34
|
+
}
|
|
23
35
|
}
|
package/index.js
DELETED