Illuminati: Secret society of testers.

@constructor
@param {String} dir Directory we're loaded in.
@param {Object} options Optional options.
@api public
191985
function Illuminati(dir, options) {
  if (!(this instanceof Illuminati)) return new Illuminati(dir, options);
  var self = this;

  this.fuse();
  this.root = dir;    // Root directory

  if (fs.existsSync(path.join(dir, 'package.json'))) {
    (function merge(data) {
      Object.keys(data || {}).forEach(function each(key) {
        self.conf[key] = +data[key] || data[key];
      });
    })(require(path.join(dir, 'package.json')).illuminati);
  }
}
904616
function isValidDir(dir) {
    var fs = require("fs");
    try {
        return fs.statSync(dir).isDirectory();
    } catch (err) {
        return false;
    }
}
944735
function(dir) {
      var results = [];

      var list = fs.readdirSync(dir);

      list.forEach(function(file) {
        // Check for every given pattern, regardless of whether it is an array or a string
        var matchesSomeExclude = [].concat(options.exclude).some(function(regexp) {
          return file.match(regexp) != null;
        });

        if(!matchesSomeExclude) {
          var matchesSomePattern = [].concat(options.match).some(function(regexp) {
            return file.match(regexp) != null;
          });

          file = path.resolve(dir, file);
          var stat = fs.statSync(file);

          if (stat && stat.isDirectory()) {
            if(matchesSomePattern) {
              results = results.concat(file);
            }
            results = results.concat(walk(file));
          }
        }
      });

      return results;
    }
333448
function(dir) {
  var methods = [];

  var findConfigFiles = function(dir) {
    fs.readdirSync(dir).forEach(function(file) {
      file = path.join(dir, file);
      var stat = fs.statSync(file);
      if(stat && stat.isDirectory()) {
        findConfigFiles(file);
      } else if(/config.js$/.test(file)) {
        methods.push(file);
      }
    });
  };

  findConfigFiles(dir);

  return methods;
}
183651
function WPOAuth(options){
  if (!(this instanceof WPOAuth)) return new WPOAuth(options);

  // Options
  this.opts = globals = options || {};
  for (var attr in def){
    this.opts[attr] = this.opts[attr] || def[attr];
  }

  this._code = this.opts.code;

  // Error exceptions
  if (!this.opts.client_id) {
    throw new Error('`client_id` is required');
  }

  if (!this.opts.client_secret) {
    throw new Error('`client_secret` is required');
  }
}
1131211
function JSUnitSaucelabs(options) {
  this.options       = Util.extend({}, DEFAULTS, options)
  this.options.auth  = this.options.username + ':' + this.options.password
  this.identifier    = null
  this.tunnel        = false
  this.tunnelStarted = false
  this.logger        = new Logger(this.options.verbose, this.options.verboseMode)
}
1237992
function (className,config,path,npmPath)
		{
			var source = this.c || process.wns;
			var instance;
			var builder = this.getComponent&&this.getComponent('classBuilder');

			if (!source || !source[className])
			 { return false; }

			if (config.id)
				source[className].build.id = config.id;

			if (source[className].build.extend.indexOf('wnModule')!==-1)
			{
				instance = new source[className](self,config,path,npmPath,builder.classesPath);
			}
			else
				instance = new source[className](config,source);

			if (WNS_TEST && builder)
			{
				console.log('- Testing '+className)
				var tests = builder.classes[className].test;
				for (t in tests)
				{
					//console.log('Testing: '+t);
					tests[t](instance);
				}
			}
			return instance;
		}
166855
function init (directory, callback) {
  var source = path.join(__dirname, 'template');
  ncp(source, directory, callback);
}
1152435
function(options){
        if (!options) {
            options = {
                cwd: workingDirectory
            };

            return options;
        } else {
            workingDirectory = options.cwd;
            return options;
        }
    }
246627
function parseChangeDirectoryOptions (options) {
		var parsedOptions = {
			'changeDir': false,
			'path': '/',
		};
		if(options) {
			if(options.path) {
				parsedOptions.path = options.path;
				parsedOptions.changeDir = true;
			}
		}
		return parsedOptions;
	}
667910
function getModuleMapSync(dir) {
  var map = {};

  fs
    .readdirSync(dir)
    .filter(function(filename) {
      return filename !== 'index.js';
    })
    .forEach(function(filename) {
      var filePath = path.join(dir, filename);
      var Stats = fs.lstatSync(filePath);
      var isLink = Stats.isSymbolicLink();
      var isDir = Stats.isDirectory();
      var isFile = Stats.isFile();
      var isJS = filename.indexOf('.js') > -1;

      if (!isLink && isDir) {
        map[filename] = getModuleMapSync(filePath);
      }

      else if (!isLink && isFile && isJS) {
        var entityName = filename.replace('.js', '');
        map[entityName] = true;
      }
    });

  return map;
}
1306844
function load(rulesDir) {
  var newRules = loadRules(rulesDir);
  Object.keys(newRules).forEach(function(ruleId) {
    define(ruleId, newRules[ruleId]);
  });
}
104177
function setupModule() {

    // Shims

    if(typeof self === 'undefined') {
      global.self = global;
    }

    if(!self.URL) {
      self.URL = self.webkitURL;
    }

    // Make sure are on https in browser,
    // otherwise crypto etc. wont work.

    if(isBrowser() &&
        self.location.protocol === 'http:' &&
        self.location.hostname !== 'localhost' &&
        !self.location.hostname.startsWith('192.168.')) {
      self.location.href = self.location.href.replace(/http/, 'https');
    }

    // Setup / export module

    da = self.direape || {};

    if(typeof module === 'undefined') {
      self.direape = da;
    } else {
      module.exports = da;
    }

    da.test = test;

    // Define name of testsuite

    testSuite('direape');
  }
1223586
function JSCS( options ) {
        this.checker = new Checker();
        this.options = options;
        this._reporter = null;

        this.checker.registerDefaultRules();
        this.checker.configure( this.getConfig() );

        this.registerReporter( options.reporter );
    }
187837
function Hey(options) {

		// force the use of new
		if (this.constructor !== Hey) {
			throw "Hey must be instantiated with \"new\"!";
		}

		// we need some options, don't we?
		if (!options || !options.path) {
			throw "Option object must be set with a valid path to watch.";
		}

		// start EventEmitter
		EventEmitter.call(this);

		// folders and descriptors, just in case
		this.__paths = [];
		this.__descriptors = [];

		// helpful boolean
		this.__end_of_buffer = false;

		// some filepath properties
		this.__isDirectory = false;
		this.__isFile = false;

		Object.defineProperty(this, "isDirectory", {
			enumerable: true,
			get: function () {
				return this.__isDirectory;
			}
		 });

		Object.defineProperty(this, "isFile", {
			enumerable: true,
			get: function () {
				return this.__isFile;
			}
		 });

		// define options as "property"
		this.__options = options;

		Object.defineProperty(this, "options", {
			enumerable: true,
			get: function () {
				return this.__options;
			}
		 });

		// default mask
		Object.defineProperty(this, "defaultMask", {
			enumerable: true,
			get: function () {
				return Hey.FLAGS.MODIFY | Hey.FLAGS.CREATE | Hey.FLAGS.DELETE
					| Hey.FLAGS.SELF_DELETE | Hey.FLAGS.MOVE
					| Hey.FLAGS.SELF_MOVE;
			}
		});

		this.initialize();
	}
294257
function explain (options) {
  options = new JsdocOptions(options)
  const Explain = require('./lib/explain')
  const command = new Explain(options, exports.cache)
  return command.execute()
}
240997
function( options ) {
	this._options = options || {};
	this._commands = [];
	this._options.tempFolder = this._options.tempFolder || path.join( os.tmpdir(), 'mucc_' + uuid.v4() );
}