Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

force-delete

0.1.0 • Public • Published

node-force-delete Travis-CI.org Build Status Coveralls.io Coverage Rating

Forcfully delete a property from an object. Works even with un-configurable property descriptors.

var forceDelete = require('force-delete');
 
var obj = { foo = 'bar' };
forceDelete(obj, 'foo');
console.log(obj);                             //-> {}
 
var fn = function(a, b, c) { /* ... */ };
forceDelete(fn, 'length');
console.log(fn.length);                       //-> 0
Object.defineProperty(fn, 'length', {
  value: 10
});
console.log(fn.length);                       //-> 10

License

Licensed under the MIT license

install

npm i force-delete

Downloadsweekly downloads

0

version

0.1.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability