The npm package clear-module had inconsistent release frequency between May 2017 and August 2025. Releases occurred sporadically, with several months or years passing between versions. The most recent release was in November 2021 (version 4.1.2). There have been no releases in the past four years.
clear-module lets you clear modules from the Node.js module cache. This is particularly useful for testing, allowing you to isolate module behavior and prevent stale cache interference during repeated test runs. The package provides flexible methods for clearing specific modules, entire directories, or even the entire cache. This helps ensure a clean slate when testing modules that rely on global state or have caching mechanisms. It supports exact module path matching and pattern-based selection for nuanced cache management.
Clear-module downloads show consistent growth from March 2024 to June 2025, peaking at 3.9 million. After June, the downloads experienced a downward trend. The downloads for current partial month of September 2025 stand at 1 million.