parseNpmCmdShim
View as Markdownfunction parseNpmCmdShim(text): | { target: string; viaNode: boolean;} | null;Defined in: protocol/dist/node.d.ts:66
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 (..).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”| {
target: string;
viaNode: boolean;
}
| null