@luxass/utils 2.7.0 → 2.7.3
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.ts → index.d.mts} +6 -6
- package/dist/{index.js → index.mjs} +5 -5
- package/dist/{object-CyGLe77G.js → object.mjs} +1 -1
- package/dist/{path-BcSxT2uo.js → path.mjs} +1 -2
- package/dist/types.mjs +1 -0
- package/package.json +21 -23
- package/dist/guards.d.ts +0 -2
- package/dist/guards.js +0 -3
- package/dist/number.d.ts +0 -2
- package/dist/number.js +0 -3
- package/dist/object.d.ts +0 -2
- package/dist/object.js +0 -3
- package/dist/path.d.ts +0 -2
- package/dist/path.js +0 -3
- package/dist/string.d.ts +0 -2
- package/dist/string.js +0 -3
- package/dist/types.d.ts +0 -2
- package/dist/types.js +0 -0
- /package/dist/{guards-SWdmRZ5e.d.ts → guards.d.mts} +0 -0
- /package/dist/{guards-O1HGJraI.js → guards.mjs} +0 -0
- /package/dist/{number-Culbli-Y.d.ts → number.d.mts} +0 -0
- /package/dist/{number-BS9T5WGO.js → number.mjs} +0 -0
- /package/dist/{object-BtzfqVfB.d.ts → object.d.mts} +0 -0
- /package/dist/{path-CFkUYi0a.d.ts → path.d.mts} +0 -0
- /package/dist/{string-BgrFQWVx.d.ts → string.d.mts} +0 -0
- /package/dist/{string-BlwTLoKD.js → string.mjs} +0 -0
- /package/dist/{types-CdpK0-xy.d.ts → types.d.mts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isNotNull, isNotNullish, isNotUndefined, isTruthy } from "./guards
|
|
2
|
-
import { clamp } from "./number
|
|
3
|
-
import { getChangedKeys, getOwnProperty, hasOwnProperty, omit } from "./object
|
|
4
|
-
import { appendTrailingSlash, prependLeadingSlash, trimLeadingSlash, trimTrailingSlash } from "./path
|
|
5
|
-
import { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase } from "./string
|
|
6
|
-
import { ElementOf, InferArguments, Prettify, RemoveIndexSignature } from "./types
|
|
1
|
+
import { isNotNull, isNotNullish, isNotUndefined, isTruthy } from "./guards.mjs";
|
|
2
|
+
import { clamp } from "./number.mjs";
|
|
3
|
+
import { getChangedKeys, getOwnProperty, hasOwnProperty, omit } from "./object.mjs";
|
|
4
|
+
import { appendTrailingSlash, prependLeadingSlash, trimLeadingSlash, trimTrailingSlash } from "./path.mjs";
|
|
5
|
+
import { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase } from "./string.mjs";
|
|
6
|
+
import { ElementOf, InferArguments, Prettify, RemoveIndexSignature } from "./types.mjs";
|
|
7
7
|
import pRetry from "p-retry";
|
|
8
8
|
|
|
9
9
|
//#region src/common.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { clamp } from "./number
|
|
4
|
-
import { getChangedKeys, getOwnProperty, hasOwnProperty, omit } from "./object
|
|
5
|
-
import { appendTrailingSlash, prependLeadingSlash, trimLeadingSlash, trimTrailingSlash } from "./path
|
|
1
|
+
import { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase } from "./string.mjs";
|
|
2
|
+
import { isNotNull, isNotNullish, isNotUndefined, isTruthy } from "./guards.mjs";
|
|
3
|
+
import { clamp } from "./number.mjs";
|
|
4
|
+
import { getChangedKeys, getOwnProperty, hasOwnProperty, omit } from "./object.mjs";
|
|
5
|
+
import { appendTrailingSlash, prependLeadingSlash, trimLeadingSlash, trimTrailingSlash } from "./path.mjs";
|
|
6
6
|
import pRetry from "p-retry";
|
|
7
7
|
|
|
8
8
|
//#region src/common.ts
|
|
@@ -19,7 +19,7 @@ function hasOwnProperty(obj, key) {
|
|
|
19
19
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
20
20
|
}
|
|
21
21
|
function getOwnProperty(obj, key) {
|
|
22
|
-
if (!hasOwnProperty(obj, key)) return
|
|
22
|
+
if (!hasOwnProperty(obj, key)) return;
|
|
23
23
|
return obj[key];
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -119,8 +119,7 @@ function joinURL(base, ...segments) {
|
|
|
119
119
|
if (path.length > 0) {
|
|
120
120
|
const pathTrailing = path[path.length - 1] === "/";
|
|
121
121
|
const segLeading = seg[0] === "/";
|
|
122
|
-
|
|
123
|
-
if (both) path += seg.slice(1);
|
|
122
|
+
if (pathTrailing && segLeading) path += seg.slice(1);
|
|
124
123
|
else path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
125
124
|
} else path += seg;
|
|
126
125
|
}
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/utils",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.3",
|
|
4
4
|
"description": "A collection of utilities for JavaScript/TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"email": "lucasnrgaard@gmail.com",
|
|
9
9
|
"url": "https://luxass.dev"
|
|
10
10
|
},
|
|
11
|
-
"packageManager": "pnpm@10.
|
|
11
|
+
"packageManager": "pnpm@10.28.2",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"homepage": "https://github.com/luxass/utils",
|
|
14
14
|
"repository": {
|
|
@@ -23,18 +23,16 @@
|
|
|
23
23
|
],
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"exports": {
|
|
26
|
-
".": "./dist/index.
|
|
27
|
-
"./guards": "./dist/guards.
|
|
28
|
-
"./number": "./dist/number.
|
|
29
|
-
"./object": "./dist/object.
|
|
30
|
-
"./path": "./dist/path.
|
|
31
|
-
"./string": "./dist/string.
|
|
32
|
-
"./types": "./dist/types.
|
|
26
|
+
".": "./dist/index.mjs",
|
|
27
|
+
"./guards": "./dist/guards.mjs",
|
|
28
|
+
"./number": "./dist/number.mjs",
|
|
29
|
+
"./object": "./dist/object.mjs",
|
|
30
|
+
"./path": "./dist/path.mjs",
|
|
31
|
+
"./string": "./dist/string.mjs",
|
|
32
|
+
"./types": "./dist/types.mjs",
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
|
-
"
|
|
36
|
-
"module": "./dist/index.js",
|
|
37
|
-
"types": "./dist/index.d.ts",
|
|
35
|
+
"types": "./dist/index.d.mts",
|
|
38
36
|
"files": [
|
|
39
37
|
"dist"
|
|
40
38
|
],
|
|
@@ -50,18 +48,18 @@
|
|
|
50
48
|
"typecheck": "tsc --noEmit"
|
|
51
49
|
},
|
|
52
50
|
"dependencies": {
|
|
53
|
-
"p-retry": "
|
|
51
|
+
"p-retry": "7.1.1"
|
|
54
52
|
},
|
|
55
53
|
"devDependencies": {
|
|
56
|
-
"@luxass/eslint-config": "
|
|
57
|
-
"@types/node": "
|
|
58
|
-
"@vitest/coverage-v8": "
|
|
59
|
-
"eslint": "
|
|
60
|
-
"eslint-plugin-format": "
|
|
61
|
-
"publint": "
|
|
62
|
-
"tsdown": "
|
|
63
|
-
"typescript": "
|
|
64
|
-
"vitest": "
|
|
65
|
-
"vitest-package-exports": "
|
|
54
|
+
"@luxass/eslint-config": "7.0.0",
|
|
55
|
+
"@types/node": "22.18.3",
|
|
56
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
57
|
+
"eslint": "9.39.2",
|
|
58
|
+
"eslint-plugin-format": "1.3.1",
|
|
59
|
+
"publint": "0.3.17",
|
|
60
|
+
"tsdown": "0.20.2",
|
|
61
|
+
"typescript": "5.9.3",
|
|
62
|
+
"vitest": "4.0.18",
|
|
63
|
+
"vitest-package-exports": "1.2.0"
|
|
66
64
|
}
|
|
67
65
|
}
|
package/dist/guards.d.ts
DELETED
package/dist/guards.js
DELETED
package/dist/number.d.ts
DELETED
package/dist/number.js
DELETED
package/dist/object.d.ts
DELETED
package/dist/object.js
DELETED
package/dist/path.d.ts
DELETED
package/dist/path.js
DELETED
package/dist/string.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase } from "./string-BgrFQWVx.js";
|
|
2
|
-
export { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase };
|
package/dist/string.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase } from "./string-BlwTLoKD.js";
|
|
2
|
-
|
|
3
|
-
export { capitalize, dedent, dedentRaw, formatStr, sanitizeIdentifier, toCamelCase, toKebabCase, toPascalCase, toSnakeCase };
|
package/dist/types.d.ts
DELETED
package/dist/types.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|