require-it
Version:
This module extends the default Node.js require with capabilities to require nested modules, independent on where they are nested.
11 lines (10 loc) • 497 B
TypeScript
export declare const isFile: (file: string) => boolean;
export declare const isFolder: (folder: string) => boolean;
export declare const isScopedModule: (name: string) => boolean;
export declare const isNodeModule: (name: string) => boolean;
export declare const getNodeModulesOfFolder: (folder: string) => string[];
export interface PackageJSON {
main: string;
}
export declare const getFolder: (path: string) => string;
export declare const readPackageJSON: (folder: string) => PackageJSON;