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.

23 lines (22 loc) 666 B
import "../../../chunk-G2ADBYYC.js"; import isFunction from "./isFunction"; import isString from "./isString"; import hasOwnProp from "./hasOwnProp"; const helperCreateiterateIndexOf = (callback) => (obj, iterate, context) => { if (!obj || !isFunction(iterate)) { return -1; } if (Array.isArray(obj) || isString(obj)) { return callback(obj, iterate, context); } for (let key of Object.keys(obj)) { if (hasOwnProp(obj, key) && iterate.call(context, obj[key], key, obj)) { return key; } } return -1; }; var helperCreateiterateIndexOf_default = helperCreateiterateIndexOf; export { helperCreateiterateIndexOf_default as default };