UNPKG

@wordpress/hooks

Version:
14 lines (13 loc) 423 B
// packages/hooks/src/createCurrentHook.ts function createCurrentHook(hooks, storeKey) { return function currentHook() { const hooksStore = hooks[storeKey]; const currentArray = Array.from(hooksStore.__current); return currentArray.at(-1)?.name ?? null; }; } var createCurrentHook_default = createCurrentHook; export { createCurrentHook_default as default }; //# sourceMappingURL=createCurrentHook.js.map