@oscarpalmer/atoms 0.199.0 → 0.201.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/queue.d.mts CHANGED
@@ -216,6 +216,8 @@ declare function isQueueInstance<Instance>(name: string, value: unknown): value
216
216
  /**
217
217
  * Create a keyed queue for an asynchronous callback function, where each key has its own queue
218
218
  *
219
+ * _Available as `keyedQueue` and `queue.keyed`_
220
+ *
219
221
  * @param callback Callback function for queued items
220
222
  * @param options Queue options
221
223
  */
@@ -223,6 +225,8 @@ declare function keyedQueue<Callback extends (key: string, ...parameters: any[])
223
225
  /**
224
226
  * Create a keyed queue for an asynchronous callback function, where each key has its own queue
225
227
  *
228
+ * _Available as `keyedQueue` and `queue.keyed`_
229
+ *
226
230
  * @param callback Callback function for queued items
227
231
  * @param options Queue options
228
232
  */
@@ -115,6 +115,8 @@ declare namespace fuzzy {
115
115
  /**
116
116
  * Does the needle match the haystack in a fuzzy way?
117
117
  *
118
+ * _Available as `fuzzyMatch` and `fuzzy.match`_
119
+ *
118
120
  * @param haystack Haystack to search through
119
121
  * @param needle Needle to search for
120
122
  * @returns `true` if the needle matches the haystack in a fuzzy way, otherwise `false`
@@ -58,6 +58,8 @@ function fuzzy(items, configuration) {
58
58
  }
59
59
  /**
60
60
  * Does the needle match the haystack in a fuzzy way?
61
+ *
62
+ * _Available as `fuzzyMatch` and `fuzzy.match`_
61
63
  *
62
64
  * @param haystack Haystack to search through
63
65
  * @param needle Needle to search for
@@ -135,6 +135,8 @@ declare namespace freeze {
135
135
  /**
136
136
  * Is the value frozen?
137
137
  *
138
+ * _Available as `isFrozen` and `freeze.is`_
139
+ *
138
140
  * @param value Value to check
139
141
  * @returns `true` if the value is frozen, otherwise `false`
140
142
  */
@@ -65,6 +65,8 @@ function freezeValue(value, references, flat) {
65
65
  }
66
66
  /**
67
67
  * Is the value frozen?
68
+ *
69
+ * _Available as `isFrozen` and `freeze.is`_
68
70
  *
69
71
  * @param value Value to check
70
72
  * @returns `true` if the value is frozen, otherwise `false`
@@ -60,7 +60,7 @@ type Merger = {
60
60
  * @param values Values to merge
61
61
  * @returns Merged value
62
62
  */
63
- <Values extends ArrayOrPlainObject[]>(values: NestedPartial<Values[number]>[]): UnionToIntersection<Values[number]>;
63
+ <Values extends ArrayOrPlainObject[]>(values: Array<NestedPartial<Values[number]>>): UnionToIntersection<Values[number]>;
64
64
  };
65
65
  /**
66
66
  * Assign values from one or more objects to the first one
@@ -29,7 +29,8 @@ function createMergeOptions(options) {
29
29
  }
30
30
  function getReplaceableObjects(value) {
31
31
  const items = (Array.isArray(value) ? value : [value]).filter((item) => typeof item === "string" || item instanceof RegExp);
32
- if (items.length > 0) return (name) => items.some((item) => typeof item === "string" ? item === name : item.test(name));
32
+ if (items.length === 0) return;
33
+ return (name) => items.some((item) => typeof item === "string" ? item === name : item.test(name));
33
34
  }
34
35
  /**
35
36
  * Create an assigner with predefined options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscarpalmer/atoms",
3
- "version": "0.199.0",
3
+ "version": "0.201.0",
4
4
  "description": "Atomic utilities for making your JavaScript better.",
5
5
  "keywords": [
6
6
  "array",
@@ -278,10 +278,10 @@
278
278
  "watch": "npx vite build --watch"
279
279
  },
280
280
  "devDependencies": {
281
- "@oxlint/plugins": "^1.81",
282
- "@types/node": "^26.4",
281
+ "@oxlint/plugins": "^1.82",
282
+ "@types/node": "^26.5",
283
283
  "@vitest/coverage-istanbul": "^4.1",
284
- "eslint": "^10.9",
284
+ "eslint": "^10.10",
285
285
  "jsdom": "^30",
286
286
  "tsdown": "^0.23",
287
287
  "typescript": "^6",
package/plugin/index.js CHANGED
@@ -29,7 +29,7 @@ export const mathPlugins = [
29
29
  export const miscPlugins = [
30
30
  tryCatchPlugin,
31
31
  getPlugin('number', 'getNumber', new Set(['Number']), true, true),
32
- getPlugin('promise', 'promises', new Set(['all', 'allSettled']), true),
32
+ getPlugin('promise', 'promises', new Set(['all', 'allKeyed', 'allSettled']), true),
33
33
  getPlugin('value', 'assign', new Set(['assign']), true),
34
34
  getPlugin('value', 'clone', new Set(['structuredClone']), true, true),
35
35
  getPlugin('value', 'equal', new Set(['is']), true),