toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

A zero-dependency 📦 tree-shakable🌲 collection of missing JavaScript utilities.

Results 10 toolbox issues
Sort by recently updated
recently updated
newest added

ref-to: #58 issue to bind only arguments without `this` argument include: - implement (partial) - tests (partial) - JSDoc (partial)

### Function Signature ```typescript declare global { export interface Function { bindArgs(this: T, ...args: A): OmitThisParameter; } } ``` ### Motivation With the `bind` method, we must pass `thisArg` as...

proposal

This PR adds replace function

### Describe the bug The `isNull` guard is not working for the nested nullable chain. ### Expected behavior The following code should compile with the `--strict` flag. ```typescript function f(x:...

### Function Signature ```JavaScript const minuteFormat = (value) => { const minutes = Math.trunc(value / 60); const seconds = value % 60; return `${minutes < 10 ? `0${minutes}` : minutes}:${seconds...

proposal

### Function Signature ```JavaScript const getUrlParams = () => { const pl = /\+/g; const search = /([^&=]+)=?([^&]*)/g; const decode = (s) => { return decodeURIComponent(s.replace(pl, " ")); }; const...

proposal

The `once` function was caching error states - when the wrapped function threw on first invocation, subsequent calls returned `undefined` instead of retrying. This differs from standard `once` semantics where...

### Function Signature function once any>(fn: T): T; ### Motivation once restricts a function to be invoked only once. Subsequent calls return the cached result: ```ts const initialize = once(()...

proposal

https://the-guild.dev/blog/nextra-4#nextra-theme-docs-changes