{"name":"decache","version":"4.6.0","description":"decache (Delete Cache) lets you delete modules from node.js require() cache; useful when testing your modules/projects.","main":"decache.js","scripts":{"coverage":"nyc tape ./test/test.js && nyc check-coverage","nocov":"tape ./test/test.js","test":"nyc tape ./test/test.js | tap-nyc"},"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":{"modern-syslog":"^1.2.0","nyc":"^15.0.1","pre-commit":"^1.2.2","tap-nyc":"^1.0.3","tap-spec":"^5.0.0","tape":"^5.0.0"},"pre-commit":["coverage"],"dependencies":{"callsite":"^1.0.0"},"nyc":{"check-coverage":true,"lines":100,"statements":100,"functions":100,"branches":100,"include":["decache.js","setup.js","lib/mymodule/index.js","lib/othermodule.js"],"exclude":["test/test.js"],"reporter":["lcov","text-summary"],"cache":false,"all":true,"report-dir":"./coverage"},"gitHead":"ac87daf9d35ea1cde99d867d5cfeca492a32e3fd","_id":"decache@4.6.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-PppOuLiz+DFeaUvFXEYZjLxAkKiMYH/do/b/MxpDe/8AgKBi5GhZxridoVIbBq72GDbL36e4p0Ce2jTGUwwU+w==","shasum":"87026bc6e696759e82d57a3841c4e251a30356e8","tarball":"http://registry-npm.ywwl.com/decache/download/decache-4.6.0.tgz","fileCount":9,"unpackedSize":9924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuhvaCRA9TVsSAnZWagAAkjQP/iDXHsg+57itU99hwAOK\nCGeAn0RXC6fRQEdFZsqTvOF+h/nyWHMNkxymuLH5jjsFKL5XYneiP/8Bky0N\ntuDrz4Pmnp6xph2nKHJsOt2aus6tV3+z0BvhRwFF3h3BWzPag0ArLQwWX+Wc\niWRnVTaoyydA5i7ua+QvCVjcOB2RxzZnXCqqhcwb+DS070lz+KWQQE6b5SBS\nllTO/wg+Djv3UxbTpU61bSOY6yU8FjoKpowktOV4zR/L0VwN92qHpCFZX3W1\nAFXZVr5V0vRz9NeRBZDVj2nkqvzF+XdP5OemQyAepZWM5bjH7Z60LwqWBhO5\nvnvJNx38Lak06Z/qDTMCkMxmZZOuCzBIfPGLmNjAHlILOHIVpep2u+TQb6sv\n56PcfwF7/ZIAhyJYOZPye7vWOFY/qmYx5fQ5rYZ1d5J9foBHzGjUwOOmHG8P\nScL9a+upS4ViT9XOSvvTzjfktDICasrxDCb7tpa93sGxsgnm8xRvEKmT/4VI\nRUxvbd+LJzqnAX41bZE1UuZ6odgQUVpSIn0fjNzDb5CyuWm7MjuWfE14/AVz\nFfsIe5wI40y+AcFZltmGQP+xMp2PPdvgLpHIwDTXqhBFOsEpu6AM8Zdk9KK/\nSYWCh239GXc02Ceubg00H7HV/Z1335oCnD+9V+UufA1h2+DbKON3nCJF2REy\nb/y0\r\n=dMBX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVMKl3xhRBL+kJwQYFpw6vtnAxhdbTojk9MokDOzZbKAIgBlc65sfDtXZLWLe7IuLvaxiGCmAsPVPxdr2Nyn0KZs8="}],"size":3760,"noattachment":false,"key":"/decache/-/decache-4.6.0.tgz"},"maintainers":[{"name":"nelsonic","email":"contact.nelsonic@gmail.com"}],"_npmUser":{"name":"nelsonic","email":"contact.nelsonic@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decache_4.6.0_1589255129933_0.34903233549633583"},"_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":1589255130032,"_cnpm_publish_time":1589255130032,"dist-tags":{"latest":"4.6.2"}}