hasOwnProperty

 1 var hasOwnProperty = Object.prototype.hasOwnProperty
 2 /**
 3  * Check whether the object has the property.
 4  *
 5  * @param {Object} obj
 6  * @param {String} key
 7  * @return {Boolean}
 8  */
 9 export function hasOwn(obj, key) {
10     return hasOwnProperty.call(obj, key)
11 }

 

posted @ 2020-06-11 11:29  xlsdg  阅读(49)  评论(0)    收藏  举报