moderndash
Advanced tools
Comparing version 0.11.4 to 0.11.5
@@ -140,3 +140,5 @@ /** | ||
* // ---- Custom compare function ---- | ||
* intersection((a, b) => Math.floor(a) === Math.floor(b), [1.2, 1.1], [1.3, 2.4]) | ||
* const compareFn = (a, b) => Math.floor(a) === Math.floor(b); | ||
* | ||
* intersection(compareFn, [1.2, 1.1], [1.3, 2.4]) | ||
* // => [1.2] | ||
@@ -322,17 +324,2 @@ * | ||
/** | ||
* Generic function type, should fit any function. Useful for parameterizing a function with a function. | ||
* @template TFunc - The input function type | ||
* | ||
* @example | ||
* function log<TFunc extends GenericFunction<TFunc>>(func: TFunc): TFunc { | ||
* return (...args: Parameters<TFunc>) => { | ||
* console.log(...args); | ||
* return func(...args); | ||
* }; | ||
* } | ||
* | ||
* const add = (a: number, b: number) => a + b; | ||
* const addAndLog = log(add); | ||
*/ | ||
type GenericFunction<TFunc extends (...args: any) => void> = (...args: Parameters<TFunc>) => ReturnType<TFunc>; | ||
@@ -693,8 +680,8 @@ | ||
* **Methods:** | ||
* - {@link Queue.add} - adds a async function or array of functions to the queue. Returns a promise that resolves when the added function(s) finish. | ||
* - {@link Queue.clear} - clears the queue. | ||
* - {@link Queue.pause} - pauses the queue. | ||
* - {@link Queue.resume} - resumes the queue. | ||
* - {@link Queue.getQueue} - returns the queue. | ||
* - {@link Queue.isPaused} - returns whether the queue is paused. | ||
* - `add` - adds a async function or array of functions to the queue. Returns a promise that resolves when the added function(s) finish. | ||
* - `clear` - clears the queue. | ||
* - `pause` - pauses the queue. | ||
* - `resume` - resumes the queue. | ||
* - `getQueue` - returns the current queue. | ||
* - `isPaused` - returns whether the queue is paused. | ||
* | ||
@@ -701,0 +688,0 @@ * @example |
@@ -54,3 +54,3 @@ { | ||
}, | ||
"version": "0.11.4" | ||
"version": "0.11.5" | ||
} |
@@ -39,3 +39,3 @@  | ||
## 🔖 Introduction | ||
## 📓 Introduction | ||
ModernDash is a modern and lightweight alternative to utility libraries like Lodash. It provides important functions while encouraging use of native JS where possible. | ||
@@ -42,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
211204
2396