给对象新增一个“不可枚举”的成员

    1. const def = function def(obj, key, value) {
    2. Object.defineProperty(obj, key, {
    3. value,
    4. writable: true,
    5. configurable: true,
    6. enumerable: false
    7. })
    8. }