@oscarpalmer/toretto 0.33.0 → 0.35.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/toretto.full.js +10 -27
- package/package.json +5 -5
package/dist/toretto.full.js
CHANGED
|
@@ -34,19 +34,6 @@ function isPlainObject(value) {
|
|
|
34
34
|
const prototype = Object.getPrototypeOf(value);
|
|
35
35
|
return prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null;
|
|
36
36
|
}
|
|
37
|
-
new Set([
|
|
38
|
-
Int8Array,
|
|
39
|
-
Uint8Array,
|
|
40
|
-
Uint8ClampedArray,
|
|
41
|
-
Int16Array,
|
|
42
|
-
Uint16Array,
|
|
43
|
-
Int32Array,
|
|
44
|
-
Uint32Array,
|
|
45
|
-
Float32Array,
|
|
46
|
-
Float64Array,
|
|
47
|
-
BigInt64Array,
|
|
48
|
-
BigUint64Array
|
|
49
|
-
]);
|
|
50
37
|
function compact(array, strict) {
|
|
51
38
|
if (!Array.isArray(array)) return [];
|
|
52
39
|
if (strict === true) return array.filter(Boolean);
|
|
@@ -254,7 +241,7 @@ function calculate() {
|
|
|
254
241
|
var TOTAL = 10;
|
|
255
242
|
var TRIM_PART = 2;
|
|
256
243
|
var TRIM_TOTAL = 4;
|
|
257
|
-
|
|
244
|
+
calculate().then((value) => {});
|
|
258
245
|
function clamp(value, minimum, maximum, loop) {
|
|
259
246
|
if (![
|
|
260
247
|
value,
|
|
@@ -357,7 +344,7 @@ function memoize(callback, options) {
|
|
|
357
344
|
}
|
|
358
345
|
var DEFAULT_CACHE_SIZE = 1024;
|
|
359
346
|
function camelCase(value) {
|
|
360
|
-
return toCase(
|
|
347
|
+
return toCase("camel", value, true, false);
|
|
361
348
|
}
|
|
362
349
|
function capitalize(value) {
|
|
363
350
|
if (typeof value !== "string" || value.length === 0) return "";
|
|
@@ -365,7 +352,7 @@ function capitalize(value) {
|
|
|
365
352
|
return memoizedCapitalize.run(value);
|
|
366
353
|
}
|
|
367
354
|
function kebabCase(value) {
|
|
368
|
-
return toCase(
|
|
355
|
+
return toCase("kebab", value, false, false);
|
|
369
356
|
}
|
|
370
357
|
function toCase(type, value, capitalizeAny, capitalizeFirst) {
|
|
371
358
|
memoizers[type] ??= memoize(toCaseCallback.bind({
|
|
@@ -401,15 +388,11 @@ function toCaseCallback(value) {
|
|
|
401
388
|
var EXPRESSION_CAMEL_CASE = /(\p{Ll})(\p{Lu})/gu;
|
|
402
389
|
var EXPRESSION_ACRONYM = /(\p{Lu}*)(\p{Lu})(\p{Ll}+)/gu;
|
|
403
390
|
var REPLACEMENT_CAMEL_CASE = "$1-$2";
|
|
404
|
-
var TYPE_CAMEL = "camel";
|
|
405
|
-
var TYPE_KEBAB = "kebab";
|
|
406
|
-
var TYPE_PASCAL = "pascal";
|
|
407
|
-
var TYPE_SNAKE = "snake";
|
|
408
391
|
var delimiters = {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
392
|
+
camel: "",
|
|
393
|
+
kebab: "-",
|
|
394
|
+
pascal: "",
|
|
395
|
+
snake: "_"
|
|
413
396
|
};
|
|
414
397
|
var memoizers = {};
|
|
415
398
|
var memoizedCapitalize;
|
|
@@ -470,11 +453,11 @@ function handleTemplate(value, pattern, ignoreCase, variables) {
|
|
|
470
453
|
return values[key];
|
|
471
454
|
});
|
|
472
455
|
}
|
|
473
|
-
|
|
456
|
+
function template(value, variables, options) {
|
|
474
457
|
const { ignoreCase, pattern } = getTemplateOptions(options);
|
|
475
458
|
return handleTemplate(value, pattern, ignoreCase, variables);
|
|
476
|
-
}
|
|
477
|
-
template.initialize = (options)
|
|
459
|
+
}
|
|
460
|
+
template.initialize = function(options) {
|
|
478
461
|
const { ignoreCase, pattern } = getTemplateOptions(options);
|
|
479
462
|
return (value, variables) => {
|
|
480
463
|
return handleTemplate(value, pattern, ignoreCase, variables);
|
package/package.json
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
"url": "https://oscarpalmer.se"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@oscarpalmer/atoms": "^0.
|
|
7
|
+
"@oscarpalmer/atoms": "^0.127"
|
|
8
8
|
},
|
|
9
9
|
"description": "A collection of badass DOM utilities.",
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@types/node": "^25",
|
|
12
12
|
"@vitest/coverage-istanbul": "^4",
|
|
13
13
|
"jsdom": "^27.4",
|
|
14
|
-
"oxfmt": "^0.
|
|
15
|
-
"oxlint": "^1.
|
|
16
|
-
"rolldown": "1.0.0-beta.
|
|
14
|
+
"oxfmt": "^0.22",
|
|
15
|
+
"oxlint": "^1.38",
|
|
16
|
+
"rolldown": "1.0.0-beta.58",
|
|
17
17
|
"tslib": "^2.8",
|
|
18
18
|
"typescript": "^5.9",
|
|
19
19
|
"vite": "8.0.0-beta.5",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
},
|
|
94
94
|
"type": "module",
|
|
95
95
|
"types": "types/index.d.ts",
|
|
96
|
-
"version": "0.
|
|
96
|
+
"version": "0.35.0"
|
|
97
97
|
}
|