Node.js examples for Object:Property
Make property non-enumerable.
Object.defineProperty(Array.prototype, 'pull', { enumerable:false,//w w w .ja v a2 s. co m writable:true, configurable:true }); /** * Removes the passed item from an array, the opposite of push(). * @param item * @return {*} */ Array.prototype.pull = function (item) { var index = this.indexOf(item); if (index > -1) { this.splice(index, 1); return index; } else { return -1; } };