code: function matchEngine(matchSpec) {
      if (Array !== matchSpec.constructor) {
          matchSpec = [matchSpec];
      }
      var idx;
      var len = matchSpec.length;
  
      var engineName = phantom.casperEngine;
      var engineVersion = phantom.version;
  
      for (idx = 0; idx < len; ++idx) {
          var match = matchSpec[idx];
          var version = match.version;
          var min = version && version.min;
          var max = version && version.max;
          if ('*' === min) {
              min = null;
          }
          if ('*' === max) {
              max = null;
          }
          if (match.name === engineName &&
              (!min || gteVersion(engineVersion, min)) &&
              (!max || !ltVersion(max, engineVersion))
          ) {
              return match;
          }
      }
      return false;
  }
docs: Checks if the engine matches a specifier.
  
  A match specifier is an object of the form:
  {
  name: 'casperjs' | 'phantomjs',
  version: {
  min:   Object,
  max:   Object
  },
  message: String
  }
  
  Minimal and maximal versions to be matched are determined using
  utils.cmpVersion.
  
  @param  Mixed    matchSpec  a single match specifier object or
  an Array of match specifier objects
  @return Boolean