UNPKG

nestjs-autoloader

Version:
14 lines (13 loc) 506 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isScript = isScript; const testInfixes = ['test', 'spec', 'e2e-test', 'e2e-spec']; function isScript(name) { return ( // Include js and ts files. (name.endsWith('.js') || name.endsWith('.ts')) && // Exclude type mappings. !name.endsWith('.d.ts') && // Exclude test-related files. !testInfixes.find((infix) => name.endsWith(`.${infix}.ts`) || name.endsWith(`.${infix}.js`))); }