docs(bindKey): fix link (#490)

This commit is contained in:
D-Sketon 2024-09-08 21:01:12 +08:00 committed by GitHub
parent cb01e51c7b
commit 7085ea0b56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -1,8 +1,14 @@
# bindKey
::: info
This function is only available in `es-toolkit/compat` for compatibility reasons. It either has alternative native JavaScript APIs or isnt fully optimized yet.
When imported from `es-toolkit/compat`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).
:::
Creates a function that invokes the method at `object[key]` with `partialArgs` prepended to the arguments it receives.
This method differs from [`bind`](../compat/function/bind.md) by allowing bound functions to reference methods that may be redefined or don't yet exist.
This method differs from [`bind`](./bind.md) by allowing bound functions to reference methods that may be redefined or don't yet exist.
The `bindKey.placeholder` value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.

View File

@ -1,8 +1,15 @@
# bindKey
::: info
出于兼容性原因,此函数仅在 `es-toolkit/compat` 中提供。它可能具有替代的原生 JavaScript API或者尚未完全优化。
`es-toolkit/compat` 导入时,它的行为与 lodash 完全一致,并提供相同的功能,详情请见 [这里](../../../compatibility.md)。
:::
创建一个函数,该函数调用 `object[key]` 上的方法,并将 `partialArgs` 作为其接收的参数的前置参数。
此方法与 [`bind`](../compat/function/bind.md) 不同,它允许绑定的函数引用可能被重新定义或尚不存在的方法。
此方法与 [`bind`](./bind.md) 不同,它允许绑定的函数引用可能被重新定义或尚不存在的方法。
`bindKey.placeholder` 的值默认是一个 `symbol`,可以用作附加的部分参数的占位符。