@juantroconisf/lib 1.3.0 → 1.5.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/package.json +8 -4
- package/src/index.ts +10 -0
- package/tsconfig.json +13 -0
- package/types/types.ts +0 -0
- package/index.js +0 -5
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juantroconisf/lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "types/types.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "exit 0"
|
|
8
9
|
},
|
|
@@ -10,10 +11,13 @@
|
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "git+ssh://git@github.com/juandiegotroconis/lib.git"
|
|
12
13
|
},
|
|
13
|
-
"author": "",
|
|
14
|
+
"author": "Juan T",
|
|
14
15
|
"license": "ISC",
|
|
15
16
|
"bugs": {
|
|
16
17
|
"url": "https://github.com/juandiegotroconis/lib/issues"
|
|
17
18
|
},
|
|
18
|
-
"homepage": "https://github.com/juandiegotroconis/lib#readme"
|
|
19
|
+
"homepage": "https://github.com/juandiegotroconis/lib#readme",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"typescript": "^5.5.4"
|
|
22
|
+
}
|
|
19
23
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const generateRandomNumber = (min: number, max: number): number => {
|
|
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
|
+
};
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2016",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"typeRoots": ["./types"],
|
|
10
|
+
"outDir": "./dist"
|
|
11
|
+
},
|
|
12
|
+
"include": ["src/**/*.ts"]
|
|
13
|
+
}
|
package/types/types.ts
ADDED
|
File without changes
|