{"library":"clear-module","type":"library","category":null,"description":"Clear a module from the Node.js require cache, forcing a fresh reload on the next require. Current stable version is 4.1.3 (last updated 2020, Node >=8). It recursively clears the target module and all its parent modules from the cache. Alternatives like delete require.cache[require.resolve(...)] do not handle recursive clearing. Common use case: testing where modules have state or need to be reloaded. Ships TypeScript definitions. Low maintenance, no dependencies.","language":"javascript","status":"maintenance","version":"4.1.3","tags":["javascript","clear","module","require","import","cache","uncache","uncached","unrequire","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install clear-module","imports":["import clearModule from 'clear-module'","clearModule.all()","clearModule.match(/regex/)","clearModule.single(moduleId)"]},{"cmd":"yarn add clear-module","imports":[]},{"cmd":"pnpm add clear-module","imports":[]}],"homepage":"https://github.com/sindresorhus/clear-module#readme","github":"https://github.com/sindresorhus/clear-module","docs":null,"changelog":null,"pypi":null,"npm":"clear-module","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}