UNPKG

@gasket/plugin-intl

Version:
18 lines (17 loc) 634 B
/// <reference types="@gasket/plugin-data" /> /** @type {import('@gasket/core').HookHandler<'publicGasketData'>} */ Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return publicGasketDataHook; } }); async function publicGasketDataHook(gasket, publicGasketData, { req }) { var _publicGasketData; const locale = await gasket.actions.getIntlLocale(req); (_publicGasketData = publicGasketData).intl ?? (_publicGasketData.intl = {}); publicGasketData.intl.locale = locale; return publicGasketData; }