UNPKG

@opentiny/vue-renderless

Version:

An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.

25 lines (24 loc) 584 B
import "../../../chunk-G2ADBYYC.js"; import each from "../base/each"; import isFunction from "../base/isFunction"; import property from "../function/property"; const objectMap = (obj, iterate, context) => { let result = {}; if (obj) { if (iterate) { if (!isFunction(iterate)) { iterate = property(iterate); } each(obj, (val, index) => { result[index] = iterate.call(context, val, index, obj); }); } else { return obj; } } return result; }; var objectMap_default = objectMap; export { objectMap_default as default };