How to use the temp.cleanupSync function in temp

To help you get started, we’ve selected a few temp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appcelerator / node-appc / test / test-detect.js View on Github external
afterEach(function () {
			process.env.PATH = this.PATH;
			delete process.env.DETECT_TEST_PATH;
			delete process.env.DETECT_TEST_PATH2;
			temp.cleanupSync();
		});
github DefinitelyTyped / DefinitelyTyped / types / temp / temp-tests.ts View on Github external
function testCleanupSync() {
    const cleanupResult: boolean | temp.Stats = temp.cleanupSync();
    if (typeof cleanupResult === "boolean") {
        const x = cleanupResult;
    } else {
        const { dirs, files } = cleanupResult;
        dirs.toPrecision(4);
        files.toPrecision(4);
    }
}