@oscarpalmer/atoms 0.134.0 → 0.136.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/atoms.full.js +19 -9
- package/dist/index.js +2 -2
- package/dist/queue.js +18 -0
- package/dist/string/index.js +2 -2
- package/dist/string/misc.js +1 -9
- package/package.json +3 -3
- package/src/queue.ts +21 -0
- package/src/string/index.ts +1 -1
- package/src/string/misc.ts +0 -9
- package/types/queue.d.ts +12 -0
- package/types/string/index.d.ts +1 -1
- package/types/string/misc.d.ts +0 -6
package/dist/atoms.full.js
CHANGED
|
@@ -2135,6 +2135,18 @@ var Queue = class {
|
|
|
2135
2135
|
return this.#runners > 0;
|
|
2136
2136
|
}
|
|
2137
2137
|
/**
|
|
2138
|
+
* Does the queue automatically start when the first item is added?
|
|
2139
|
+
*/
|
|
2140
|
+
get autostart() {
|
|
2141
|
+
return this.#options.autostart;
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* Maximum number of runners to process the queue concurrently
|
|
2145
|
+
*/
|
|
2146
|
+
get concurrency() {
|
|
2147
|
+
return this.#options.concurrency;
|
|
2148
|
+
}
|
|
2149
|
+
/**
|
|
2138
2150
|
* Is the queue empty?
|
|
2139
2151
|
*/
|
|
2140
2152
|
get empty() {
|
|
@@ -2147,6 +2159,12 @@ var Queue = class {
|
|
|
2147
2159
|
return this.#options.maximum > 0 && this.#items.length >= this.#options.maximum;
|
|
2148
2160
|
}
|
|
2149
2161
|
/**
|
|
2162
|
+
* Maximum number of items allowed in the queue
|
|
2163
|
+
*/
|
|
2164
|
+
get maximum() {
|
|
2165
|
+
return this.#options.maximum;
|
|
2166
|
+
}
|
|
2167
|
+
/**
|
|
2150
2168
|
* Is the queue paused?
|
|
2151
2169
|
*/
|
|
2152
2170
|
get paused() {
|
|
@@ -2653,14 +2671,6 @@ const REPLACEMENT_CAMEL_CASE = "$1-$2";
|
|
|
2653
2671
|
let memoizedCapitalize;
|
|
2654
2672
|
let memoizedTitleCase;
|
|
2655
2673
|
/**
|
|
2656
|
-
* Create a new UUID-string
|
|
2657
|
-
* @deprecated Use {@link getUuid} instead
|
|
2658
|
-
* @returns UUID string
|
|
2659
|
-
*/
|
|
2660
|
-
function createUuid() {
|
|
2661
|
-
return getUuid();
|
|
2662
|
-
}
|
|
2663
|
-
/**
|
|
2664
2674
|
* Check if a string ends with a specified substring
|
|
2665
2675
|
* @param haystack String to look in
|
|
2666
2676
|
* @param needle String to look for
|
|
@@ -3318,4 +3328,4 @@ function unsmush(value) {
|
|
|
3318
3328
|
}
|
|
3319
3329
|
return unsmushed;
|
|
3320
3330
|
}
|
|
3321
|
-
export { frame_rate_default as FRAME_RATE_MS, PromiseTimeoutError, QueueError, SizedMap, SizedSet, average, beacon, between, camelCase, capitalize, chunk, clamp, clone, compact, compare, count,
|
|
3331
|
+
export { frame_rate_default as FRAME_RATE_MS, PromiseTimeoutError, QueueError, SizedMap, SizedSet, average, beacon, between, camelCase, capitalize, chunk, clamp, clone, compact, compare, count, debounce, delay, diff, endsWith, equal, error, exists, filter, find, flatten, fromQuery, getArray, getColor, getForegroundColor, getHexColor, getHexaColor, getHslColor, getHslaColor, getNormalizedHex, getNumber, getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems, getRgbColor, getRgbaColor, getString, getUuid, getValue, groupBy, hexToHsl, hexToHsla, hexToRgb, hexToRgba, hslToHex, hslToRgb, hslToRgba, includes, indexOf, insert, isArrayOrPlainObject, isColor, isEmpty, isError, isFulfilled, isHexColor, isHslColor, isHslLike, isHslaColor, isKey, isNullable, isNullableOrEmpty, isNullableOrWhitespace, isNumber, isNumerical, isObject, isOk, isPlainObject, isPrimitive, isRejected, isResult, isRgbColor, isRgbLike, isRgbaColor, isTypedArray, join, kebabCase, logger, lowerCase, max, memoize, merge, min, noop, ok, parse, partial, pascalCase, promises, push, queue, result, rgbToHex, rgbToHsl, rgbToHsla, round, setValue, shuffle, smush, snakeCase, sort, splice, startsWith, sum, template, throttle, timed, titleCase, toMap, toQuery, toRecord, toSet, trim, truncate, unique, unsmush, unwrap, upperCase, words };
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import { fromQuery, toQuery } from "./query.js";
|
|
|
44
44
|
import { getRandomBoolean, getRandomCharacters, getRandomColor, getRandomHex, getRandomItem, getRandomItems } from "./random.js";
|
|
45
45
|
import { error, isError, isOk, isResult, ok, result, unwrap } from "./result.js";
|
|
46
46
|
import { camelCase, capitalize, kebabCase, lowerCase, pascalCase, snakeCase, titleCase, upperCase } from "./string/case.js";
|
|
47
|
-
import {
|
|
47
|
+
import { endsWith, getUuid, includes, parse, startsWith, trim, truncate } from "./string/misc.js";
|
|
48
48
|
import { getValue } from "./internal/value/get.js";
|
|
49
49
|
import { template } from "./string/template.js";
|
|
50
50
|
import "./string/index.js";
|
|
@@ -56,4 +56,4 @@ import { partial } from "./value/partial.js";
|
|
|
56
56
|
import { smush } from "./value/smush.js";
|
|
57
57
|
import { unsmush } from "./value/unsmush.js";
|
|
58
58
|
import "./value/index.js";
|
|
59
|
-
export { frame_rate_default as FRAME_RATE_MS, PromiseTimeoutError, QueueError, SizedMap, SizedSet, average, beacon, between, camelCase, capitalize, chunk, clamp, clone, compact, compare, count,
|
|
59
|
+
export { frame_rate_default as FRAME_RATE_MS, PromiseTimeoutError, QueueError, SizedMap, SizedSet, average, beacon, between, camelCase, capitalize, chunk, clamp, clone, compact, compare, count, debounce, delay, diff, endsWith, equal, error, exists, filter, find, flatten, fromQuery, getArray, getColor, getForegroundColor, getHexColor, getHexaColor, getHslColor, getHslaColor, getNormalizedHex, getNumber, getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems, getRgbColor, getRgbaColor, getString, getUuid, getValue, groupBy, hexToHsl, hexToHsla, hexToRgb, hexToRgba, hslToHex, hslToRgb, hslToRgba, includes, indexOf, insert, isArrayOrPlainObject, isColor, isEmpty, isError, isFulfilled, isHexColor, isHslColor, isHslLike, isHslaColor, isKey, isNullable, isNullableOrEmpty, isNullableOrWhitespace, isNumber, isNumerical, isObject, isOk, isPlainObject, isPrimitive, isRejected, isResult, isRgbColor, isRgbLike, isRgbaColor, isTypedArray, join, kebabCase, logger, lowerCase, max, memoize, merge, min, noop, ok, parse, partial, pascalCase, promises, push, queue, result, rgbToHex, rgbToHsl, rgbToHsla, round, setValue, shuffle, smush, snakeCase, sort, splice, startsWith, sum, template, throttle, timed, titleCase, toMap, toQuery, toRecord, toSet, trim, truncate, unique, unsmush, unwrap, upperCase, words };
|
package/dist/queue.js
CHANGED
|
@@ -13,6 +13,18 @@ var Queue = class {
|
|
|
13
13
|
return this.#runners > 0;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
+
* Does the queue automatically start when the first item is added?
|
|
17
|
+
*/
|
|
18
|
+
get autostart() {
|
|
19
|
+
return this.#options.autostart;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Maximum number of runners to process the queue concurrently
|
|
23
|
+
*/
|
|
24
|
+
get concurrency() {
|
|
25
|
+
return this.#options.concurrency;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
16
28
|
* Is the queue empty?
|
|
17
29
|
*/
|
|
18
30
|
get empty() {
|
|
@@ -25,6 +37,12 @@ var Queue = class {
|
|
|
25
37
|
return this.#options.maximum > 0 && this.#items.length >= this.#options.maximum;
|
|
26
38
|
}
|
|
27
39
|
/**
|
|
40
|
+
* Maximum number of items allowed in the queue
|
|
41
|
+
*/
|
|
42
|
+
get maximum() {
|
|
43
|
+
return this.#options.maximum;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
28
46
|
* Is the queue paused?
|
|
29
47
|
*/
|
|
30
48
|
get paused() {
|
package/dist/string/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getString, join, words } from "../internal/string.js";
|
|
2
2
|
import { camelCase, capitalize, kebabCase, lowerCase, pascalCase, snakeCase, titleCase, upperCase } from "./case.js";
|
|
3
|
-
import {
|
|
3
|
+
import { endsWith, getUuid, includes, parse, startsWith, trim, truncate } from "./misc.js";
|
|
4
4
|
import { template } from "./template.js";
|
|
5
|
-
export { camelCase, capitalize,
|
|
5
|
+
export { camelCase, capitalize, endsWith, getString, getUuid, includes, join, kebabCase, lowerCase, parse, pascalCase, snakeCase, startsWith, template, titleCase, trim, truncate, upperCase, words };
|
package/dist/string/misc.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { memoize } from "../function.js";
|
|
2
2
|
/**
|
|
3
|
-
* Create a new UUID-string
|
|
4
|
-
* @deprecated Use {@link getUuid} instead
|
|
5
|
-
* @returns UUID string
|
|
6
|
-
*/
|
|
7
|
-
function createUuid() {
|
|
8
|
-
return getUuid();
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
3
|
* Check if a string ends with a specified substring
|
|
12
4
|
* @param haystack String to look in
|
|
13
5
|
* @param needle String to look for
|
|
@@ -101,4 +93,4 @@ function truncate(value, length, suffix) {
|
|
|
101
93
|
return `${value.slice(0, truncatedLength)}${actualSuffix}`;
|
|
102
94
|
}
|
|
103
95
|
var matchMemoizers = {};
|
|
104
|
-
export {
|
|
96
|
+
export { endsWith, getUuid, includes, parse, startsWith, trim, truncate };
|
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"@types/node": "^25.3",
|
|
9
9
|
"@vitest/coverage-istanbul": "^4",
|
|
10
10
|
"jsdom": "^28.1",
|
|
11
|
-
"oxfmt": "^0.
|
|
12
|
-
"oxlint": "^1.
|
|
11
|
+
"oxfmt": "^0.34",
|
|
12
|
+
"oxlint": "^1.49",
|
|
13
13
|
"rolldown": "1.0.0-rc.5",
|
|
14
14
|
"tslib": "^2.8",
|
|
15
15
|
"typescript": "^5.9",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
},
|
|
121
121
|
"type": "module",
|
|
122
122
|
"types": "./types/index.d.ts",
|
|
123
|
-
"version": "0.
|
|
123
|
+
"version": "0.136.0"
|
|
124
124
|
}
|
package/src/queue.ts
CHANGED
|
@@ -24,6 +24,20 @@ class Queue<CallbackParameters extends Parameters<GenericAsyncCallback>, Callbac
|
|
|
24
24
|
return this.#runners > 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Does the queue automatically start when the first item is added?
|
|
29
|
+
*/
|
|
30
|
+
get autostart(): boolean {
|
|
31
|
+
return this.#options.autostart;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Maximum number of runners to process the queue concurrently
|
|
36
|
+
*/
|
|
37
|
+
get concurrency(): number {
|
|
38
|
+
return this.#options.concurrency;
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
/**
|
|
28
42
|
* Is the queue empty?
|
|
29
43
|
*/
|
|
@@ -38,6 +52,13 @@ class Queue<CallbackParameters extends Parameters<GenericAsyncCallback>, Callbac
|
|
|
38
52
|
return this.#options.maximum > 0 && this.#items.length >= this.#options.maximum;
|
|
39
53
|
}
|
|
40
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Maximum number of items allowed in the queue
|
|
57
|
+
*/
|
|
58
|
+
get maximum(): number {
|
|
59
|
+
return this.#options.maximum;
|
|
60
|
+
}
|
|
61
|
+
|
|
41
62
|
/**
|
|
42
63
|
* Is the queue paused?
|
|
43
64
|
*/
|
package/src/string/index.ts
CHANGED
|
@@ -10,5 +10,5 @@ export {
|
|
|
10
10
|
titleCase,
|
|
11
11
|
upperCase,
|
|
12
12
|
} from './case';
|
|
13
|
-
export {
|
|
13
|
+
export {endsWith, getUuid, includes, parse, startsWith, trim, truncate} from './misc';
|
|
14
14
|
export {template, type TemplateOptions} from './template';
|
package/src/string/misc.ts
CHANGED
|
@@ -8,15 +8,6 @@ type Match = 'endsWith' | 'includes' | 'startsWith';
|
|
|
8
8
|
|
|
9
9
|
// #region Functions
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Create a new UUID-string
|
|
13
|
-
* @deprecated Use {@link getUuid} instead
|
|
14
|
-
* @returns UUID string
|
|
15
|
-
*/
|
|
16
|
-
export function createUuid(): string {
|
|
17
|
-
return getUuid();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
11
|
/**
|
|
21
12
|
* Check if a string ends with a specified substring
|
|
22
13
|
* @param haystack String to look in
|
package/types/queue.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ declare class Queue<CallbackParameters extends Parameters<GenericAsyncCallback>,
|
|
|
5
5
|
* Is the queue active?
|
|
6
6
|
*/
|
|
7
7
|
get active(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Does the queue automatically start when the first item is added?
|
|
10
|
+
*/
|
|
11
|
+
get autostart(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum number of runners to process the queue concurrently
|
|
14
|
+
*/
|
|
15
|
+
get concurrency(): number;
|
|
8
16
|
/**
|
|
9
17
|
* Is the queue empty?
|
|
10
18
|
*/
|
|
@@ -13,6 +21,10 @@ declare class Queue<CallbackParameters extends Parameters<GenericAsyncCallback>,
|
|
|
13
21
|
* Is the queue full?
|
|
14
22
|
*/
|
|
15
23
|
get full(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Maximum number of items allowed in the queue
|
|
26
|
+
*/
|
|
27
|
+
get maximum(): number;
|
|
16
28
|
/**
|
|
17
29
|
* Is the queue paused?
|
|
18
30
|
*/
|
package/types/string/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getString, join, words } from '../internal/string';
|
|
2
2
|
export type { PlainObject } from '../models';
|
|
3
3
|
export { camelCase, capitalize, kebabCase, lowerCase, pascalCase, snakeCase, titleCase, upperCase, } from './case';
|
|
4
|
-
export {
|
|
4
|
+
export { endsWith, getUuid, includes, parse, startsWith, trim, truncate } from './misc';
|
|
5
5
|
export { template, type TemplateOptions } from './template';
|
package/types/string/misc.d.ts
CHANGED