kun-galgame-vue/server/util.js

15 lines
363 B
JavaScript
Raw Normal View History

2023-06-12 05:32:55 +00:00
module.exports = {
// 遍历对象
objForEach: function (obj, fn) {
let key, result
for (key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
result = fn.call(obj, key, obj[key])
if (result === false) {
break
}
}
}
},
}