@bccampus/utils 0.3.1 → 0.3.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.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/duration/to-duration.ts
|
|
3
|
+
function toDuration(durationInSeconds) {
|
|
4
|
+
return `${Math.floor(durationInSeconds / 3600).toString().padStart(2, "0")}:${Math.floor(durationInSeconds % 3600 / 60).toString().padStart(2, "0")}:${(durationInSeconds % 60).toString().padStart(2, "0")}`;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.toDuration = toDuration;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toDuration(durationInSeconds: number): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/duration/to-duration.ts
|
|
2
|
+
function toDuration(durationInSeconds) {
|
|
3
|
+
return `${Math.floor(durationInSeconds / 3600).toString().padStart(2, "0")}:${Math.floor(durationInSeconds % 3600 / 60).toString().padStart(2, "0")}:${(durationInSeconds % 60).toString().padStart(2, "0")}`;
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { toDuration };
|
|
@@ -6,7 +6,7 @@ function escapeStringRegexp(string) {
|
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region node_modules/@sindresorhus/transliterate/replacements.js
|
|
9
|
-
var builtinReplacements = new Map([
|
|
9
|
+
var builtinReplacements = /* @__PURE__ */ new Map([
|
|
10
10
|
["ß", "ss"],
|
|
11
11
|
["ẞ", "Ss"],
|
|
12
12
|
["ä", "ae"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bccampus/utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "BCcampus' utility box",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
"publish": "yarn npm publish --access public --tolerate-republish"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@antfu/eslint-config": "^9.
|
|
22
|
-
"@types/node": "^24.13.
|
|
23
|
-
"@vitest/coverage-v8": "4.1.
|
|
24
|
-
"baseline-browser-mapping": "^2.
|
|
25
|
-
"eslint": "^10.
|
|
21
|
+
"@antfu/eslint-config": "^9.2.0",
|
|
22
|
+
"@types/node": "^24.13.3",
|
|
23
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
24
|
+
"baseline-browser-mapping": "^2.11.1",
|
|
25
|
+
"eslint": "^10.7.0",
|
|
26
26
|
"eslint-plugin-format": "^2.0.1",
|
|
27
|
-
"globals": "^17.
|
|
27
|
+
"globals": "^17.7.0",
|
|
28
28
|
"husky": "^9.1.7",
|
|
29
|
-
"lint-staged": "^17.0
|
|
29
|
+
"lint-staged": "^17.2.0",
|
|
30
30
|
"pinst": "^3.0.0",
|
|
31
31
|
"tinyglobby": "^0.2.17",
|
|
32
32
|
"typescript": "~6.0.3",
|
|
33
|
-
"unplugin-dts": "^1.0.
|
|
34
|
-
"vite": "^8.
|
|
35
|
-
"vitest": "^4.1.
|
|
33
|
+
"unplugin-dts": "^1.0.3",
|
|
34
|
+
"vite": "^8.1.5",
|
|
35
|
+
"vitest": "^4.1.10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@sindresorhus/slugify": "^3.0.0"
|
|
@@ -74,6 +74,11 @@
|
|
|
74
74
|
"import": "./dist/duration/is-duration.js",
|
|
75
75
|
"require": "./dist/duration/is-duration.cjs"
|
|
76
76
|
},
|
|
77
|
+
"./duration/to-duration": {
|
|
78
|
+
"types": "./dist/duration/to-duration.d.ts",
|
|
79
|
+
"import": "./dist/duration/to-duration.js",
|
|
80
|
+
"require": "./dist/duration/to-duration.cjs"
|
|
81
|
+
},
|
|
77
82
|
"./duration/to-number": {
|
|
78
83
|
"types": "./dist/duration/to-number.d.ts",
|
|
79
84
|
"import": "./dist/duration/to-number.js",
|