{"name":"decache","version":"4.5.0","description":"decache (Delete Cache) lets you delete modules from node.js require() cache; useful when testing your modules/projects.","main":"decache.js","scripts":{"nocov":"./node_modules/tape/bin/tape ./test/test.js","test":"istanbul cover ./node_modules/tape/bin/tape ./test/*.js","coverage":"istanbul cover ./node_modules/tape/bin/tape ./test/*.js && ./node_modules/.bin/istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100"},"repository":{"type":"git","url":"git+https://github.com/dwyl/decache.git"},"keywords":["delete","node.js","require","cache","uncache","un-require"],"author":{"name":"https://github.com/dwyl/decache/graphs/contributors"},"license":"MIT","bugs":{"url":"https://github.com/dwyl/decache/issues"},"homepage":"https://github.com/dwyl/decache#readme","directories":{"test":"test"},"devDependencies":{"istanbul":"^0.4.5","modern-syslog":"~1.1.4","pre-commit":"^1.2.2","tap-spec":"^5.0.0","tape":"^4.9.1"},"pre-commit":["coverage"],"dependencies":{"callsite":"^1.0.0"},"gitHead":"9f5913463c3a8ef575c164167cd47798bf253711","_id":"decache@4.5.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"nelsonic","email":"contact.nelsonic@gmail.com"},"dist":{"integrity":"sha512-XLFg1feTf4cZ5MBxJWEkvQTo7m5PiYF7oNkCGT/ibytYOUGucLBr+WZB+cbyK+6Z4wpazFbrmoUAU0+/6DC/2w==","shasum":"8709b1ccbe5a4ddcadfba42abff7e6abbbebc76b","tarball":"http://registry-npm.ywwl.com/decache/download/decache-4.5.0.tgz","fileCount":9,"unpackedSize":9664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8HTmCRA9TVsSAnZWagAA6cgP/1KhzJzVt9ISQW1g39gq\nNwEjGtgN1p83Rx8CmRKn3JewwQsUPN7SVG9u5PbtuV1IZFRPnM4oqCQ6cdYG\n1TzIz60VMLY9XBfZUCNrZxZA6LG3BSof7ubcQIPlN7HI1gpDAXbmDf1YUen5\ngGV/e7x8Ee2kK6KbjgWOaNE2XcgRu6b15mtO+CzspfkxqTh3/7oV3IKZyVPi\niXSzoLLsZmz/ozTMcXAx6/esBTZ87k4KLA+Y4s4cDT40/UPaR5oRqFdaxf5O\ng8NoN0gP/leFFUk8KcsGMC8w1sSFBzoRWqIBCIdHgwGyZ9BA3w/sAqUHolOM\npuRn5mb+13iYcpnyNVkGPbZiMelw1EWdHsQdm4tJqwRclOvhfooNmz6a6+Jj\nUXlszASr1uHbGYndyWv1aW3UtI1K3P1LoAFmr1okH9AtaDljFavAdXpcE7gN\nIWIHQfm0XXJzsJ9o5RReJNUvr9ArglBSA1WmDgWHKATBxsao68Cdxv30mp8D\nsguWpcw8Pvpw14PCrhoK0M1n1wi0JmTLQn2Rc96tQ5toLsxHyJcFJ51eOTJx\nS0ona6yd113zgebmoyOH/3epOv8CFOKUlLDZRIfDJTmwujafzLSDbZ82ySRr\n4aPsZCVNWMl1aNDJomE47ngoCUnph5xaKm1ooVgeNu9Lv3ehgtv461XzJTOK\n9JFH\r\n=AG8Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRF8VopywYc8A4/xqGjNoIjat08zbNk17rEokltu1MzAIgU4uPaxLjaRpRE/1EIwmlq+T4J32dLgrEpCvcHqk9puM="}],"size":3689,"noattachment":false,"key":"/decache/-/decache-4.5.0.tgz"},"maintainers":[{"name":"nelsonic","email":"contact.nelsonic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decache_4.5.0_1542485221180_0.8210992649927578"},"_hasShrinkwrap":false,"readme":"# `decache`\n\nDelete a module from node.js' `require.cache` so you can freshly `require` it again.\n\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dwyl/decache/ci.yml?branch=main&label=build&style=flat-square)\n[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/decache/main.svg?style=flat-square)](https://codecov.io/github/dwyl/decache?branch=main)\n[![dependency status](https://img.shields.io/librariesio/release/npm/decache?style=flat-square)](https://github.com/dwyl/decache/blob/main/package.json#L43)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/decache/issues)\n[![HitCount](https://hits.dwyl.com/dwyl/decache.svg)](https://hits.dwyl.com/dwyl/decache)\n\nIn node.js when you `require()` a module, node stores a cached version of the\nmodule, so that all subsequent calls to `require()` do not have to reload\nthe module from the filesystem.\n\n`decache` ( _**De**lete **Cache**_ ) lets you delete modules from node.js `require()` cache\nthis is useful when _**testing**_ your modules/projects.\n\n## Why?\n\nWhen testing our modules we often need to re-require the module being tested.\nThis makes it easy.\n\n## What?\n\nAn easy way to delete a cached module.\n\n## How? (_usage_)\n\n### install\n\nInstall the module from npm:\n\n```sh\nnpm install decache --save-dev\n```\n\n### Use it in your code:\n\n```js\n// require the decache module:\nconst decache = require('decache');\n\n// require a module that you wrote\"\nlet mymod = require('./mymodule.js');\n\n// use your module the way you need to:\nconsole.log(mymod.count()); // 0   (the initial state for our counter is zero)\nconsole.log(mymod.incrementRunCount()); // 1\n\n// delete the cached module:\ndecache('./mymodule.js');\n\n//\nmymod = require('./mymodule.js'); // fresh start\nconsole.log(mymod.count()); // 0   (back to initial state ... zero)\n```\n\nModules other than `.js`, like for example, `.jsx`, are supported as well.\n\nNote that native modules with the `.node` extension are ignored from decaching because\nthey behave unexpectedly when decached.\n\nIf you have any questions or need more examples, please create a GitHub issue:\nhttps://github.com/dwyl/decache/issues\n\n***Thanks***!\n","publish_time":1542485221354,"_cnpm_publish_time":1542485221354,"dist-tags":{"latest":"4.6.2"}}