@juantroconisf/lib 1.5.2 → 1.6.1
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/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +32 -10
- package/dist/index.mjs +7 -0
- package/package.json +5 -8
- package/src/functions.ts +3 -0
- package/src/index.ts +1 -10
- package/tsconfig.json +5 -6
- package/tsup.config.ts +10 -0
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
8
15
|
}
|
|
9
|
-
|
|
10
|
-
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
11
|
-
return randomNumber;
|
|
16
|
+
return to;
|
|
12
17
|
};
|
|
13
|
-
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
greetUser: () => greetUser,
|
|
24
|
+
sayHello: () => sayHello
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
|
|
28
|
+
// src/functions.ts
|
|
29
|
+
var sayHello = () => "Hello world!";
|
|
30
|
+
var greetUser = (name) => `Hello ${name}!`;
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
greetUser,
|
|
34
|
+
sayHello
|
|
35
|
+
});
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juantroconisf/lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./types/types.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
|
-
"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+ssh://git@github.com/juandiegotroconis/lib.git"
|
|
9
|
+
"build": "tsup"
|
|
13
10
|
},
|
|
14
11
|
"author": "Juan T",
|
|
15
12
|
"license": "ISC",
|
package/src/functions.ts
ADDED
package/src/index.ts
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
// Ensure min is less than max, swap values if needed
|
|
3
|
-
if (min > max) {
|
|
4
|
-
[min, max] = [max, min];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// Generate a random number within the specified range
|
|
8
|
-
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
9
|
-
return randomNumber;
|
|
10
|
-
};
|
|
1
|
+
export * from "./functions";
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"module": "
|
|
3
|
+
"target": "ES2023",
|
|
4
|
+
"module": "CommonJS",
|
|
5
5
|
"esModuleInterop": true,
|
|
6
6
|
"forceConsistentCasingInFileNames": true,
|
|
7
7
|
"strict": true,
|
|
8
|
-
"
|
|
9
|
-
"typeRoots": ["./types"],
|
|
10
|
-
"outDir": "./dist"
|
|
8
|
+
"outDir": "dist"
|
|
11
9
|
},
|
|
12
|
-
"include": ["src/**/*.ts"]
|
|
10
|
+
"include": ["src/**/*.ts"],
|
|
11
|
+
"exclude": ["node_modules"]
|
|
13
12
|
}
|