Creates an instance of Feature.
@param {any} [ua=null]
@param {any} [flags={}]
@param {string} [cssFlagsPrefix='feature']

@memberOf Feature
500935
function Feature() {
      var _this;

      var ua = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var cssFlagsPrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'feature';

      _classCallCheck(this, Feature);

      _this = _possibleConstructorReturn(this, _getPrototypeOf(Feature).call(this, ua, flags, cssFlagsPrefix));

      _this._createTestElements();

      _this.addEventListener = _this.getAddEventListener();
      _this.asyncScript = _this.getAsyncScript();
      _this.battery = _this.getBattery();
      _this.cors = _this.getCors();
      _this.deferScript = _this.getDeferScript();
      _this.file = _this.getFile();
      _this.fileSystem = _this.getFileSystem();
      _this.fullscreen = _this.getFullscreen();
      _this.fullscreenKeyboard = _this.getFullscreenKeyboard();
      _this.geolocation = _this.getGeolocation();
      _this.historyAPI = _this.getHistoryAPI();
      _this.littleEndian = _this.getLittleEndian();
      _this.localStorage = _this.getLocalStorage();
      _this.matchMedia = _this.getMatchMedia();
      _this.querySelector = _this.getQuerySelector();
      _this.querySelectorAll = _this.getQuerySelectorAll();
      _this.serviceWorker = _this.getServiceWorker();
      _this.typedArray = _this.getTypedArray();
      _this.userMedia = _this.getUserMedia();
      _this.vibration = _this.getVibration();
      _this.worker = _this.getWorker();
      return _this;
    }
535516
function prodHandler(curPath, opts, importPath, jsFilename, template, t){
    var absPath = resolve(importPath, jsFilename)

    const cssStr = fse.readFileSync(absPath).toString()
    const {styles: obj} = createStylefromCode(cssStr, absPath)
    const cssObj = convertStylesToRNCSS(obj)

    var defautIdenti = curPath.node.specifiers[0].local.name
    const buildNode = template('const STYLES = STYOBJ;', { sourceType: 'module' })
    const styleExpre = buildNode({
        STYLES: t.identifier(defautIdenti),
        STYOBJ: t.identifier(cssObj)
    })

    curPath.replaceWith(styleExpre)
}
248081
function Assertion (obj, flag, parent) {
    this.obj = obj;
    this.flags = {};

    if (undefined != parent) {
      this.flags[flag] = true;

      for (var i in parent.flags) {
        if (parent.flags.hasOwnProperty(i)) {
          this.flags[i] = true;
        }
      }
    }

    var $flags = flag ? flags[flag] : keys(flags)
      , self = this;

    if ($flags) {
      for (var i = 0, l = $flags.length; i < l; i++) {
        // avoid recursion
        if (this.flags[$flags[i]]) continue;

        var name = $flags[i]
          , assertion = new Assertion(this.obj, name, this)

        if ('function' == typeof Assertion.prototype[name]) {
          // clone the function, make sure we dont touch the prot reference
          var old = this[name];
          this[name] = function () {
            return old.apply(self, arguments);
          };

          for (var fn in Assertion.prototype) {
            if (Assertion.prototype.hasOwnProperty(fn) && fn != name) {
              this[name][fn] = bind(assertion[fn], assertion);
            }
          }
        } else {
          this[name] = assertion;
        }
      }
    }
  }
851697
function(feature) {
        var style = this.defaultsPerSymbolizer ? {} : this.createLiterals(
            OpenLayers.Util.extend({}, this.defaultStyle), feature);
        
        var rules = this.rules;

        var rule, context;
        var elseRules = [];
        var appliedRules = false;
        for(var i=0, len=rules.length; i<len; i++) {
            rule = rules[i];
            // does the rule apply?
            var applies = rule.evaluate(feature);
            
            if(applies) {
                if(rule instanceof OpenLayers.Rule && rule.elseFilter) {
                    elseRules.push(rule);
                } else {
                    appliedRules = true;
                    this.applySymbolizer(rule, style, feature);
                }
            }
        }
        
        // if no other rules apply, apply the rules with else filters
        if(appliedRules == false && elseRules.length > 0) {
            appliedRules = true;
            for(var i=0, len=elseRules.length; i<len; i++) {
                this.applySymbolizer(elseRules[i], style, feature);
            }
        }

        // don't display if there were rules but none applied
        if(rules.length > 0 && appliedRules == false) {
            style.display = "none";
        }
        
        if (style.label != null && typeof style.label !== "string") {
            style.label = String(style.label);
        }
        
        return style;
    }
21559
function(feature) {
        var fid = feature ? feature.fid || feature.id : null;
        var hfid = this.hoverFeature ?
            this.hoverFeature.fid || this.hoverFeature.id : null;
            
        if(hfid && hfid != fid) {
            this.events.triggerEvent("outfeature",
                {feature: this.hoverFeature});
            this.hoverFeature = null;
        }
        if(fid && fid != hfid) {
            this.events.triggerEvent("hoverfeature", {feature: feature});
            this.hoverFeature = feature;
        }
    }
98862
function(features) {
        var feature;
        if (features.constructor == Array)
            feature = features[0];
        else
            feature = features;

        var geometry = feature.geometry;
        var type = geometry.CLASS_NAME.split('.')[2].toLowerCase();

        var pointGeometries;
        if (type == "point")
            pointGeometries = new Array(geometry);
        else if (type == "linestring" ||
                 type == "linearring" ||
                 type == "multipoint")
            pointGeometries = geometry.components;
        else if (type == "polygon")
            pointGeometries = geometry.components[0].components;
        else
            return null;

        var flatPoints = [];

        var pointGeometriesLength = pointGeometries.length;
        for (var i = 0; i < pointGeometriesLength; ++i) {
            var pointGeometry = pointGeometries[i];
            flatPoints.push(pointGeometry.y);
            flatPoints.push(pointGeometry.x);
        }

        return this.encodeDeltas(flatPoints, 2);
    }
1321175
private ShapeStyle createStyleForFeature(Feature feature) {
		ShapeStyle style = null;
		if (null != feature) {
			FeatureStyleInfo styleInfo = null;
			if (feature.getStyleId() != null) {
				String check = feature.getStyleId();
				if (null != check) {
					for (FeatureStyleInfo fsi :
							feature.getLayer().getLayerInfo().getNamedStyleInfo().getFeatureStyles()) {
						if (check.equals(fsi.getStyleId())) {
							styleInfo = fsi;
							break;
						}
					}
				}
			}
			style = new ShapeStyle(styleInfo);
	
			Geometry geometry = feature.getGeometry();
			if (null != geometry) {
				switch (geometry.getLayerType()) {
					case LINESTRING:
					case MULTILINESTRING:
						style.merge(lineSelectStyle);
						break;
					case POLYGON:
					case MULTIPOLYGON:
						style.merge(polygonSelectStyle);
						break;
					case POINT:
					case MULTIPOINT:
						style.merge(pointSelectStyle);
						break;
					default:
						throw new IllegalStateException("Cannot create style for feature with Geometry type " +
								geometry.getLayerType());
				}
			}
		}
		return style;
	}
437036
function setFlags(flags, dispatch) {
  var flagValues = { isLDReady: true };
  for (var flag in flags) {
    var camelCasedKey = (0, _lodash2.default)(flag);
    flagValues[camelCasedKey] = ldClient.variation(flag, flags[flag]);
  }
  dispatch((0, _actions.setFlags)(flagValues));
}
872113
function initFlags(flags, dispatch) {
  var flagValues = { isLDReady: false };
  for (var flag in flags) {
    var camelCasedKey = (0, _lodash2.default)(flag);
    flagValues[camelCasedKey] = flags[flag];
  }
  dispatch((0, _actions.setFlags)(flagValues));
}
626987
def define_features
      @fvs.each do |vector, label|
        vector.each do |term, value|
          @features.add(term)
        end
      end
    end
674371
function(name, options) {
        OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
        this.features = [];
    }
152097
function createOptions( options ) {
	var object = optionsCache[ options ] = {};
	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	});
	return object;
}
868671
function createUniformWrapper(gl, program, uniforms, locations) {

  function makeGetter(index) {
    var proc = new Function('gl', 'prog', 'locations', 
      'return function(){return gl.getUniform(prog,locations[' + index + '])}') 
    return proc(gl, program, locations)
  }

  function makePropSetter(path, index, type) {
    switch(type) {
      case 'bool':
      case 'int':
      case 'sampler2D':
      case 'samplerCube':
        return 'gl.uniform1i(locations[' + index + '],obj' + path + ')'
      case 'float':
        return 'gl.uniform1f(locations[' + index + '],obj' + path + ')'
      default:
        var vidx = type.indexOf('vec')
        if(0 <= vidx && vidx <= 1 && type.length === 4 + vidx) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid data type')
          }
          switch(type.charAt(0)) {
            case 'b':
            case 'i':
              return 'gl.uniform' + d + 'iv(locations[' + index + '],obj' + path + ')'
            case 'v':
              return 'gl.uniform' + d + 'fv(locations[' + index + '],obj' + path + ')'
            default:
              throw new Error('gl-shader: Unrecognized data type for vector ' + name + ': ' + type)
          }
        } else if(type.indexOf('mat') === 0 && type.length === 4) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid uniform dimension type for matrix ' + name + ': ' + type)
          }
          return 'gl.uniformMatrix' + d + 'fv(locations[' + index + '],false,obj' + path + ')'
        } else {
          throw new Error('gl-shader: Unknown uniform data type for ' + name + ': ' + type)
        }
      break
    }
  }

  function enumerateIndices(prefix, type) {
    if(typeof type !== 'object') {
      return [ [prefix, type] ]
    }
    var indices = []
    for(var id in type) {
      var prop = type[id]
      var tprefix = prefix
      if(parseInt(id) + '' === id) {
        tprefix += '[' + id + ']'
      } else {
        tprefix += '.' + id
      }
      if(typeof prop === 'object') {
        indices.push.apply(indices, enumerateIndices(tprefix, prop))
      } else {
        indices.push([tprefix, prop])
      }
    }
    return indices
  }

  function makeSetter(type) {
    var code = [ 'return function updateProperty(obj){' ]
    var indices = enumerateIndices('', type)
    for(var i=0; i<indices.length; ++i) {
      var item = indices[i]
      var path = item[0]
      var idx  = item[1]
      if(locations[idx]) {
        code.push(makePropSetter(path, idx, uniforms[idx].type))
      }
    }
    code.push('return obj}')
    var proc = new Function('gl', 'prog', 'locations', code.join('\n'))
    return proc(gl, program, locations)
  }

  function defaultValue(type) {
    switch(type) {
      case 'bool':
        return false
      case 'int':
      case 'sampler2D':
      case 'samplerCube':
        return 0
      case 'float':
        return 0.0
      default:
        var vidx = type.indexOf('vec')
        if(0 <= vidx && vidx <= 1 && type.length === 4 + vidx) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid data type')
          }
          if(type.charAt(0) === 'b') {
            return dup(d, false)
          }
          return dup(d)
        } else if(type.indexOf('mat') === 0 && type.length === 4) {
          var d = type.charCodeAt(type.length-1) - 48
          if(d < 2 || d > 4) {
            throw new Error('gl-shader: Invalid uniform dimension type for matrix ' + name + ': ' + type)
          }
          return dup([d,d])
        } else {
          throw new Error('gl-shader: Unknown uniform data type for ' + name + ': ' + type)
        }
      break
    }
  }

  function storeProperty(obj, prop, type) {
    if(typeof type === 'object') {
      var child = processObject(type)
      Object.defineProperty(obj, prop, {
        get: identity(child),
        set: makeSetter(type),
        enumerable: true,
        configurable: false
      })
    } else {
      if(locations[type]) {
        Object.defineProperty(obj, prop, {
          get: makeGetter(type),
          set: makeSetter(type),
          enumerable: true,
          configurable: false
        })
      } else {
        obj[prop] = defaultValue(uniforms[type].type)
      }
    }
  }

  function processObject(obj) {
    var result
    if(Array.isArray(obj)) {
      result = new Array(obj.length)
      for(var i=0; i<obj.length; ++i) {
        storeProperty(result, i, obj[i])
      }
    } else {
      result = {}
      for(var id in obj) {
        storeProperty(result, id, obj[id])
      }
    }
    return result
  }

  //Return data
  var coallesced = coallesceUniforms(uniforms, true)
  return {
    get: identity(processObject(coallesced)),
    set: makeSetter(coallesced),
    enumerable: true,
    configurable: true
  }
}
1148127
function(feature, node) {
        for (var key in feature.attributes) {
            var tag = this.createElementNS(null, "tag");
            tag.setAttribute("k", key);
            tag.setAttribute("v", feature.attributes[key]);
            node.appendChild(tag);
        }
    }
1131330
function factory(options) {
  options = _.extend({}, options, defaultOptions);

  if (!_.isString(options.warpAndWeftSeparator)) {
    options.warpAndWeftSeparator = '';
  }
  if (options.warpAndWeftSeparator == '') {
    options.warpAndWeftSeparator = index.warpAndWeftSeparator;
  }

  options.transformSyntaxTree = tartan.transform([
    options.transformSyntaxTree,
    tartan.transform.fold({
      allowRootReorder: false,
      allowNestedBlocks: false,
      maxFoldLevels: 2,
      minBlockSize: 3,
      greedy: false,
      allowSplitStripe: false,
      processExistingBlocks: false
    })
  ]);

  options.join = function(components) {
    var parts = [];
    if (components.colors.length > 0) {
      parts.push(components.colors.join(' '));
    }
    if (components.warp != components.weft) {
      parts.push(components.warp + ' ' + options.warpAndWeftSeparator +
        ' ' + components.weft);
    } else {
      parts.push(components.warp);
    }
    return parts.join('\n');
  };

  return tartan.render.format(options);
}
130790
function createRuleWithVariation(rule, variationName) {
  const selector = getSelectorName(rule, variationName);
  return postcss.rule({
    selector,
  });
}
989148
function(feature) {
        if (!feature) return null;

        var featureName = feature.eClass ? feature.get('name') : feature;

        if (!_.has(this.values, featureName) && this.has(featureName)) {
            initValue(this, getEStructuralFeature(this.eClass, featureName));
        }

        var value = this.values[featureName];

        if (typeof value === 'function') {
            return value.apply(this);
        } else {
            return value;
        }
    }