UNPKG

redux-autoform-utils

Version:

Common javascript files to all the redux-autoform related projects

26 lines (23 loc) 570 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.setDateLocalizer = setDateLocalizer; exports.getDateLocalizer = getDateLocalizer; var _dateLocalizer; /** * Sets the date localizer * @param localizer */ function setDateLocalizer(localizer) { if (!localizer) throw Error('\'localizer\' should be truthy'); _dateLocalizer = localizer; } /** * Gets the date localizer * @returns {*} */ function getDateLocalizer() { if (!_dateLocalizer) throw Error('Localizer has not yet been set'); return _dateLocalizer; }