es-toolkit/docs/reference/compat/util/stubArray.md
2024-12-01 21:33:33 +09:00

534 B
Raw Permalink Blame History

stubArray

::: 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. :::

Returns a new empty array.

Signature

function stubArray(): [];

Returns

([]): A new empty array.

Examples

stubArray(); // Returns []