{"name":"clear-require","version":"3.0.0","description":"Clear a module from the `require` cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/clear-require.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"keywords":["clear","require","cache","uncache","uncached","module","unrequire","derequire","delete","del","remove","rm"],"dependencies":{"caller-path":"^2.0.0","resolve-from":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"18b8e9cdb4566900db4999da53914ae495206b9a","bugs":{"url":"https://github.com/sindresorhus/clear-require/issues"},"homepage":"https://github.com/sindresorhus/clear-require#readme","_id":"clear-require@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-uXOIRihTeiHb+cbpHqPXW3SIkJRJqH18ug37MfVb5Bhe8ab4sDvvh3rV1w4Vq9xkPpjdVL3m83eZnphc2k1ecA==","shasum":"5c33a5e5b41be6d535e7311d82f3b42fe84eff5e","tarball":"http://registry-npm.ywwl.com/clear-require/download/clear-require-3.0.0.tgz","fileCount":4,"unpackedSize":3613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4/FoCRA9TVsSAnZWagAAcdIQAIp9Y+tzlRmsqlwqWDzC\n1Xex4NU5d2JjZ3gt+hcbfLXRJNU/PhstMA5Qq4e1zhmpC9ZlN4Gp3+ZMqnL7\nGFbfVbGVfNoUZd0HBK3kw+7OHQcwkZGeB49y49PwfhqCBvDz9KL+GwZMYzY+\nw7eBj8xklsSuDwaCaD1hLHgLYTXEiQqPBPm4Dh9JOEr4Y+4WXJtESJ3/9AyJ\nDUllfpk86sLGtJh6q76FPXs0pGqzta4uhgSsO8pIkkZsF1Ay4ivppzwPLxed\nqyO0scgCD6WaVWBTddmyXP3D9UnR/dSum9Q0u/9i7xSxQ00sh+nUtjYsG626\nveKCcMPciSJbRzEdpqT5UmvblxOUXK9ThBmKPZAzuHyJuHgjQFaWyyl+ZMiO\ntu2swq5f53mO7avrP4NIuqlDHxWGshiQDONFtTKkxcriSDDEUxNby4IgyR4D\nMdzUwOCW3yE8h9GYq729OcF0qIqBRMRjlZe6YoTdUEG2Bq441EfvD+K5IYRg\n9g410zLHjjUY9s46pVM+1yRfUBimSlBmWnBygWlhlzmGDv5nA4drxw1wZreX\n6B90s1al4CTOTcaO6zeIpaYRpipvjgqNGCuqO6q+G3QyxFdetm9G3RITGLVh\nyayAdERy+NQfkUErt/FLeOEjKWd8vBUrQPtmuTZm0eLoxqTZFDOKI0CRKcsH\nWZQY\r\n=0KSp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeKVz9+pv/QcAoWtctufDuHF5ueQaqD//ZIVIxAp8zWgIgNQQnd+vGr266MFAr+lGPdS4Tb/bmCdW8Ih/XiNy2Ba0="}],"size":1845,"noattachment":false,"key":"/clear-require/-/clear-require-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/clear-require_3.0.0_1541665128102_0.7870215040328283"},"_hasShrinkwrap":false,"deprecated":"Renamed to `clear-module`.","readme":"# clear-require [![Build Status](https://travis-ci.org/sindresorhus/clear-require.svg?branch=master)](https://travis-ci.org/sindresorhus/clear-require)\n\n> Clear a module from the [`require` cache](https://nodejs.org/api/modules.html#modules_caching)\n\nUseful for testing purposes when you need to freshly `require` a module.\n\n\n## Install\n\n```\n$ npm install --save clear-require\n```\n\n\n## Usage\n\n```js\n// foo.js\nlet i = 0;\nmodule.exports = () => ++i;\n```\n\n```js\nconst clearRequire = require('clear-require');\n\nrequire('./foo')();\n//=> 1\n\nrequire('./foo')();\n//=> 2\n\nclearRequire('./foo');\n\nrequire('./foo')();\n//=> 1\n```\n\n\n## API\n\n### clearRequire(moduleId)\n\n#### moduleId\n\nType: `string`\n\nWhat you would use with `require()`.\n\n### clearRequire.all()\n\nClear all modules from the `require` cache.\n\n### clearRequire.match(regex)\n\nClear all matching modules from the `require` cache.\n\n#### regex\n\nType: `RegExp`\n\nRegex to match against the module ID's.\n\n\n## Related\n\n- [require-uncached](https://github.com/sindresorhus/require-uncached) - Require a module bypassing the cache\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","publish_time":1541665128250,"_cnpm_publish_time":1541665128250,"dist-tags":{"latest":"3.0.0"}}