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) 498 B
import "../../../chunk-G2ADBYYC.js"; const helperCreateIndexOf = (name, callback) => (obj, val) => { if (!obj) { return -1; } if (typeof obj === "string" || Array.isArray(obj)) { if (obj[name]) { return obj[name](val); } return callback(obj, val); } for (let key of Object.keys(obj)) { if (val === obj[key]) { return key; } } return -1; }; var helperCreateIndexOf_default = helperCreateIndexOf; export { helperCreateIndexOf_default as default };