MCPcopy
hub / github.com/PaulTaykalo/objc-dependency-visualizer / checkOption

Function checkOption

Scripts/ace/worker-javascript.js:2518–2533  ·  view source on GitHub ↗
(name, t)

Source from the content-addressed store, hash-verified

2516 emitter = new events.EventEmitter();
2517
2518 function checkOption(name, t) {
2519 name = name.trim();
2520
2521 if (/^[+-]W\d{3}$/g.test(name)) {
2522 return true;
2523 }
2524
2525 if (options.validNames.indexOf(name) === -1) {
2526 if (t.type !== "jslint" && !_.has(options.removed, name)) {
2527 error("E001", t, name);
2528 return false;
2529 }
2530 }
2531
2532 return true;
2533 }
2534
2535 function isString(obj) {
2536 return Object.prototype.toString.call(obj) === "[object String]";

Callers 2

doOptionFunction · 0.85
itselfFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected