MCPcopy Index your code
hub / github.com/CSSLint/csslint / processArguments

Function processArguments

src/cli/common.js:256–288  ·  view source on GitHub ↗
(args, extend)

Source from the content-addressed store, hash-verified

254
255
256 function processArguments(args, extend) {
257 var arg = args.shift(),
258 options = extend || {},
259 argName,
260 parts,
261 files = [];
262
263 while (arg) {
264 if (arg.indexOf("--") === 0) {
265 argName = arg.substring(2);
266
267 if (argName.indexOf("=") > -1) {
268 parts = argName.split("=");
269 options[parts[0]] = parts[1];
270 } else {
271 options[argName] = true;
272 }
273
274 } else {
275
276 // see if it's a directory or a file
277 if (api.isDirectory(arg)) {
278 files = files.concat(api.getFiles(arg));
279 } else {
280 files.push(arg);
281 }
282 }
283 arg = args.shift();
284 }
285
286 options.files = files;
287 return options;
288 }
289
290 function validateOptions(options) {
291 for (var optionKey in options) {

Callers 2

readConfigDataFunction · 0.85
cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…