{"name":"decache","version":"1.0.2","description":"decache (Delete Cache) lets you delete modules from node.js require() cache; useful when testing your modules/projects.","main":"decache.js","scripts":{"quick":"./node_modules/tape/bin/tape ./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","jshint":"./node_modules/jshint/bin/jshint -c .jshintrc --exclude-path .gitignore .","codeclimate":"CODECLIMATE_REPO_TOKEN=120a783703e4e63069dc63787b87900c306cc977b0f62d942b058bcbb9dd274c ./node_modules/codeclimate-test-reporter/bin/codeclimate.js < ./coverage/lcov.info"},"repository":{"type":"git","url":"git+https://github.com/nelsonic/decache.git"},"keywords":["delete","node.js","require","cache","uncache","un-require"],"author":{"name":"@nelsonic & friends!","url":"with help from StackOverflow"},"license":"GPL-2.0","bugs":{"url":"https://github.com/nelsonic/decache/issues"},"homepage":"https://github.com/nelsonic/decache#readme","directories":{"test":"test"},"devDependencies":{"codeclimate-test-reporter":"0.0.4","istanbul":"^0.3.13","jshint":"^2.6.3","pre-commit":"^1.0.6","tap-spec":"^3.0.0","tape":"^4.0.0"},"pre-commit":["jshint","coverage","codeclimate"],"gitHead":"4f0a7870424305deb87620466d2a32b49e12fc37","_id":"decache@1.0.2","_shasum":"9053f0a62ce092c51c23e55b65b28b0349f4fadc","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"nelsonic","email":"contact.nelsonic@gmail.com"},"dist":{"shasum":"9053f0a62ce092c51c23e55b65b28b0349f4fadc","tarball":"http://registry-npm.ywwl.com/decache/download/decache-1.0.2.tgz","integrity":"sha512-f6F07XM2KF9LrACjeJLfsFI0aKw5sDN+u94MOexvIL6aRc8hBsWOTMgipfFk8SG3HBAZtEuZROZC/ghAR3cO5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUbgkZLOsi0duCXEqIKO2l27AxVmvvJEHLvwD6mdkNXgIgeX1LIy/dZQskCnd/cTFnkUFpyUY0BH0rCcWBatPghj8="}],"size":2985,"noattachment":false,"key":"/decache/-/decache-1.0.2.tgz"},"maintainers":[{"name":"nelsonic","email":"contact.nelsonic@gmail.com"}],"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":1436780040089,"_cnpm_publish_time":1436780040089,"dist-tags":{"latest":"4.6.2"}}