UNPKG

@trapi/utils

Version:

Utils library package for the trapi infrastructure.

20 lines 608 B
"use strict"; /* * Copyright (c) 2021. * Author Peter Placzek (tada5hi) * For the full copyright and license information, * view the LICENSE file that was distributed with this source code. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.mapYupRuleForDictionary = void 0; function mapYupRuleForDictionary(map, rule) { if (!map) { return {}; } return Object.keys(map).reduce((newMap, key) => ({ ...newMap, [key]: rule }), {}); } exports.mapYupRuleForDictionary = mapYupRuleForDictionary; //# sourceMappingURL=yup.js.map