Skip to content

stubObject

INFO

This function is only available in es-toolkit/compat for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.

When imported from es-toolkit/compat, it behaves exactly like lodash and provides the same functionalities, as detailed here.

Returns an empty object.

Signature

typescript
function stubObject(): {};

Returns

({}): An empty object.

Examples

typescript
stubObject(); // Returns {}

Released under the MIT License.