@oscarpalmer/atoms 0.184.0 → 0.184.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.
- package/dist/array/single.mjs +2 -2
- package/dist/array/sort.mjs +5 -5
- package/dist/color/instance.mjs +2 -2
- package/dist/color/misc/get.mjs +8 -8
- package/dist/color/misc/state.d.mts +2 -2
- package/dist/color/misc/state.mjs +2 -2
- package/dist/function/once.mjs +9 -9
- package/dist/function/retry.mjs +8 -8
- package/dist/index.d.mts +5 -6
- package/dist/index.mjs +49 -53
- package/dist/internal/number.d.mts +2 -1
- package/dist/internal/number.mjs +4 -1
- package/dist/internal/result.d.mts +2 -2
- package/dist/internal/value/equal.mjs +5 -5
- package/dist/models.d.mts +1 -1
- package/dist/promise/helpers.mjs +3 -5
- package/dist/queue.mjs +5 -7
- package/dist/string/fuzzy.mjs +2 -2
- package/dist/value/freeze.d.mts +2 -2
- package/dist/value/merge.d.mts +0 -1
- package/dist/value/merge.mjs +0 -1
- package/package.json +2 -2
- package/src/array/single.ts +2 -2
- package/src/array/sort.ts +5 -5
- package/src/color/instance.ts +2 -2
- package/src/color/misc/get.ts +8 -8
- package/src/color/misc/state.ts +1 -1
- package/src/function/once.ts +9 -9
- package/src/function/retry.ts +8 -8
- package/src/internal/number.ts +6 -0
- package/src/internal/result.ts +3 -3
- package/src/internal/value/equal.ts +5 -5
- package/src/internal/value/get.ts +2 -1
- package/src/internal/value/set.ts +3 -1
- package/src/models.ts +1 -1
- package/src/promise/helpers.ts +3 -6
- package/src/queue.ts +10 -10
- package/src/string/fuzzy.ts +2 -2
- package/src/value/freeze.ts +2 -2
- package/src/value/merge.ts +0 -1
package/src/string/fuzzy.ts
CHANGED
|
@@ -184,7 +184,7 @@ function getFuzzyOptions<Item>(
|
|
|
184
184
|
return options as RequiredKeys<FuzzyOptions, 'tolerance'>;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
function
|
|
187
|
+
function getFuzzyState<Item>(items: Item[], input: unknown): FuzzyState<Item> {
|
|
188
188
|
const handler = getHandler(input);
|
|
189
189
|
const options = getFuzzyOptions(input);
|
|
190
190
|
|
|
@@ -237,7 +237,7 @@ export function fuzzy(items: unknown[], configuration?: unknown): Fuzzy<unknown>
|
|
|
237
237
|
throw new TypeError(MESSAGE_ARRAY);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
return new Fuzzy(
|
|
240
|
+
return new Fuzzy(getFuzzyState(items, configuration));
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
fuzzy.match = fuzzyMatch;
|
package/src/value/freeze.ts
CHANGED
|
@@ -24,8 +24,8 @@ export type Frozen<Value extends ArrayOrPlainObject> = {
|
|
|
24
24
|
export function freeze<Item>(array: Item[]): Frozen<Item[]>;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Freeze a
|
|
28
|
-
* @param
|
|
27
|
+
* Freeze a function
|
|
28
|
+
* @param fn Function to freeze
|
|
29
29
|
* @returns Frozen function
|
|
30
30
|
*/
|
|
31
31
|
export function freeze<Fn extends GenericCallback>(fn: Fn): Readonly<Fn>;
|