mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
9 lines
299 B
TypeScript
9 lines
299 B
TypeScript
import * as clear from 'clear-require';
|
|
|
|
clear('my-module'); // clear specific module from require cache
|
|
|
|
clear.all(); // clear all of the require cache
|
|
|
|
clear.match(new RegExp('^.*$')); // clear all modules which match the RegExp
|
|
clear.match(/^.*$/); // similar to above but using /regex/ notation
|