MCPcopy
hub / github.com/udecode/plate / bindFirst

Function bindFirst

packages/udecode/utils/src/type-utils.ts:14–19  ·  view source on GitHub ↗
(
  fn: (first: T, ...args: Args) => R,
  firstArg: T
)

Source from the content-addressed store, hash-verified

12 !isUndefinedOrNull(arg);
13
14export function bindFirst<T, Args extends any[], R>(
15 fn: (first: T, ...args: Args) => R,
16 firstArg: T
17): (...args: Args) => R {
18 return (...args) => fn(firstArg, ...args);
19}

Callers 15

DOMPlugin.tsFile · 0.90
HtmlPlugin.tsFile · 0.90
createEditorFunction · 0.90
BaseImagePlugin.tsFile · 0.85
MarkdownPlugin.tsFile · 0.85
LinkPlugin.tsxFile · 0.85
BaseDatePlugin.tsFile · 0.85
BaseTablePlugin.tsFile · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…