UNPKG

@sprucelabs/spruce-cli

Version:

Command line interface for building Spruce skills.

27 lines 752 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.argParserUtil = void 0; exports.argParserUtil = { parse(input) { if (input.length > 0) { const parts = input.split(' '); const args = {}; let key = null; for (const part of parts) { if (part[0] === '-') { key = part.replace(/^--?/, ''); } else if (key) { args[key] = part; key = null; } } if (key) { args[key] = 'true'; } return args; } return {}; }, }; //# sourceMappingURL=argParser.utility.js.map