Skip to content

Commit

Permalink
docs: add version metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Dec 1, 2024
1 parent 6a0ba7e commit 3bcc297
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/array/cartesianProduct.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: cartesianProduct
description: Perform a Cartesian product of arrays
since: 12.3.0
---

### Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/async/parallel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const users = await _.parallel(3, userIds, async userId => {

### Interrupting

Processing can be manually interrupted. Pass an `AbortController.signal` via the `signal` option. When the signal is aborted, no more calls to your callback will be made. Any in-progress calls will continue to completion, unless you manually connect the signal inside your callback. In other words, `parallel` is only responsible for aborting the array loop, not the async operations themselves.
Since v12.3.0, processing can be manually interrupted. Pass an `AbortController.signal` via the `signal` option. When the signal is aborted, no more calls to your callback will be made. Any in-progress calls will continue to completion, unless you manually connect the signal inside your callback. In other words, `parallel` is only responsible for aborting the array loop, not the async operations themselves.

When `parallel` is interrupted by the signal, it throws a `DOMException` (even in Node.js) with the message `This operation was aborted` and name `AbortError`.

Expand Down
2 changes: 1 addition & 1 deletion docs/async/retry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `retry` function runs an async function and retries it if it fails. You can
- `delay` is milliseconds to sleep between retries
- `backoff` is a function called to calculate the delay between retries
- It receives the attempt number (starting with `1`) and returns the delay in milliseconds.
- `signal` allows you to pass an `AbortController.signal` to interrupt the retry operation
- `signal` (v12.3.0+) allows you to pass an `AbortController.signal` to interrupt the retry operation

```ts
import * as _ from 'radashi'
Expand Down
1 change: 1 addition & 0 deletions docs/typed/isClass.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: isClass
description: Determine if a value was declared with `class` syntax
since: 12.3.0
---

### Usage
Expand Down
1 change: 1 addition & 0 deletions docs/typed/isUndefined.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: isUndefined
description: 'Determine if a value is undefined'
since: 12.3.0
---

### Usage
Expand Down
1 change: 1 addition & 0 deletions src/array/cartesianProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type ReadonlyArray2D<T> = readonly (readonly T[])[]
* // ['blue', 'small', 'slow']
* // ]
* ```
* @version 12.3.0
*/
export function cartesianProduct<const T extends ReadonlyArray2D<any>>(
...arrays: [...T]
Expand Down
1 change: 1 addition & 0 deletions src/typed/isClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { isFunction, type Class, type StrictExtract } from 'radashi'
* isClass('abc') // => false
* isClass({}) // => false
* ```
* @version 12.3.0
*/
export function isClass<T>(value: T): value is ExtractClass<T> {
return (
Expand Down
1 change: 1 addition & 0 deletions src/typed/isUndefined.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* isUndefined(undefined) // => true
* isUndefined(null) // => false
* ```
* @version 12.3.0
*/
export function isUndefined(value: unknown): value is undefined {
return typeof value === 'undefined'
Expand Down

0 comments on commit 3bcc297

Please sign in to comment.