Skip to content

parseNpmCmdShim

View as Markdown
function parseNpmCmdShim(text):
| {
target: string;
viaNode: boolean;
}
| null;

Defined in: node/exe.ts:124

Parses an npm cmd-shim .cmd file: the target after %dp0%\ (or %~dp0) on the line that ends with %*, and whether it is started through node ("%_prog%" / node). Null for anything else, including a target that leaves the shim’s folder (..).

Parameter Type
text string

| { target: string; viaNode: boolean; } | null