From b22f6770c8bd084d66950655203c61dd701b3d90 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 4 Jun 2022 08:51:19 +0200 Subject: Remove node_modules --- node_modules/nodemon/lib/cli/index.js | 49 ----------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 node_modules/nodemon/lib/cli/index.js (limited to 'node_modules/nodemon/lib/cli/index.js') diff --git a/node_modules/nodemon/lib/cli/index.js b/node_modules/nodemon/lib/cli/index.js deleted file mode 100644 index bf9e809..0000000 --- a/node_modules/nodemon/lib/cli/index.js +++ /dev/null @@ -1,49 +0,0 @@ -var parse = require('./parse'); - -/** - * Converts a string to command line args, in particular - * groups together quoted values. - * This is a utility function to allow calling nodemon as a required - * library, but with the CLI args passed in (instead of an object). - * - * @param {String} string - * @return {Array} - */ -function stringToArgs(string) { - var args = []; - - var parts = string.split(' '); - var length = parts.length; - var i = 0; - var open = false; - var grouped = ''; - var lead = ''; - - for (; i < length; i++) { - lead = parts[i].substring(0, 1); - if (lead === '"' || lead === '\'') { - open = lead; - grouped = parts[i].substring(1); - } else if (open && parts[i].slice(-1) === open) { - open = false; - grouped += ' ' + parts[i].slice(0, -1); - args.push(grouped); - } else if (open) { - grouped += ' ' + parts[i]; - } else { - args.push(parts[i]); - } - } - - return args; -} - -module.exports = { - parse: function (argv) { - if (typeof argv === 'string') { - argv = stringToArgs(argv); - } - - return parse(argv); - }, -}; \ No newline at end of file -- cgit