UNPKG

@mirari/mp-common

Version:

小程序公共库

17 lines (14 loc) 386 B
/** * 过滤对象的函数属性 * @param {Object} opts */ const mergeOptionsToData = (opts = {}) => { const options = Object.assign({}, opts) for (const key in options) { if (options.hasOwnProperty(key) && typeof options[key] === 'function') { delete options[key] } } return options } export default mergeOptionsToData