@juantroconisf/lib 1.5.1 → 1.6.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.
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +28 -11
- package/dist/index.mjs +5 -0
- package/package.json +5 -8
- package/src/index.ts +2 -9
- 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,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
// Generate a random number within the specified range
|
|
10
|
-
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
11
|
-
return randomNumber;
|
|
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 });
|
|
12
9
|
};
|
|
13
|
-
|
|
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 });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
sayHello: () => sayHello
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
|
+
var sayHello = () => "Hello world!";
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
sayHello
|
|
30
|
+
});
|
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.0",
|
|
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/index.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export const
|
|
2
|
-
// Ensure min is less than max, swap values if needed
|
|
3
|
-
if (min > max) {
|
|
4
|
-
[min, max] = [max, min];
|
|
5
|
-
}
|
|
1
|
+
export const sayHello = (): string => "Hello world!";
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
9
|
-
return randomNumber;
|
|
10
|
-
};
|
|
3
|
+
export const greetUser = (name: string): string => `Hello ${name}!`;
|
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
|
}
|