This helper is meant to be used to create prop types for props who's values are instances of XYZValues (or subclasses of XYZValues), general on Node and Behavior class hierarchies.
436484
function createXYZPropType(Type, override = {}) {
    return {
        attribute: { source: true, target: false }, // get the value from an attribute (but don't mirror it back)
        coerce(val, propName) {
            // if we have a property function, pass it along as is
            if (typeof val === 'function') return val

            // if we're setting the same instance, use it as is
            if (val === this[propName]) return val

            // otherwise we process the input value into the XYZValues object
            return this[propName].from(val)
        },
        default(propName) { return this._props[propName] },
        deserialize(val, propName) { return this[propName].fromString(val) },
        serialize(val, propName) { this[propName].toString() },
        ...override,
    }
}
925307
function(node, ufNameArr) {
			var context = this,
				out = {
					'root': [],
					'properties': []
				},
				classNames,
				key,
				items,
				item,
				i,
				x,
				z,
				y,
				map,
				prop,
				propName,
				v2Name,
				impiedRel,
				ufName;

			// don't get classes from excluded list of tags
			if(modules.domUtils.hasTagName(node, this.excludeTags) === false){

				// find classes for node
				classNames = modules.domUtils.getAttribute(node, 'class');
				if(classNames) {
					items = classNames.split(' ');
					x = 0;
					i = items.length;
					while(x < i) {

						item = modules.utils.trim(items[x]);

						// test for root prefix - v2
						if(modules.utils.startWith(item, context.rootPrefix) && modules.utils.isLowerCase(item)) {
							if(out.root.indexOf(item) === -1){
								out.root.push(item);
							}
							out.typeVersion = 'v2';
						}

						// test for property prefix - v2
						z = context.propertyPrefixes.length;
						while(z--) {
							if(modules.utils.startWith(item, context.propertyPrefixes[z]) && modules.utils.isLowerCase(item)) {
								out.properties.push([item,'v2']);
							}
						}

						// test for mapped root classnames v1
						for(key in modules.maps) {
							if(modules.maps.hasOwnProperty(key)) {
								// only add a root once
								if(modules.maps[key].root === item && out.root.indexOf(key) === -1) {
									// if root map has subTree set to true
									// test to see if we should create a property or root
									if(modules.maps[key].subTree) {
										out.properties.push(['p-' + modules.maps[key].root, 'v1']);
									} else {
										out.root.push(key);
										if(!out.typeVersion){
											out.typeVersion = 'v1';
										}
									}
								}
							}
						}


						// test for mapped property classnames v1
						if(ufNameArr){
							for (var a = 0; a < ufNameArr.length; a++) {
								ufName = ufNameArr[a];
								// get mapped property v1 microformat
								map = context.getMapping(ufName);
								if(map) {
									for(key in map.properties) {
										if (map.properties.hasOwnProperty(key)) {

											prop = map.properties[key];
											propName = (prop.map) ? prop.map : 'p-' + key;

											if(key === item) {
												if(prop.uf) {
													// loop all the classList make sure
													//   1. this property is a root
													//   2. that there is not already an equivalent v2 property i.e. url and u-url on the same element
													y = 0;
													while(y < i) {
														v2Name = context.getV2RootName(items[y]);
														// add new root
														if(prop.uf.indexOf(v2Name) > -1 && out.root.indexOf(v2Name) === -1) {
															out.root.push(v2Name);
															out.typeVersion = 'v1';
														}
														y++;
													}
													//only add property once
													if(out.properties.indexOf(propName) === -1) {
														out.properties.push([propName,'v1']);
													}
												} else {
													if(out.properties.indexOf(propName) === -1) {
														out.properties.push([propName,'v1']);
													}
												}
											}
										}

									}
								}
							}

						}

						x++;

					}
				}
			}


			// finds any alt rel=* mappings for a given node/microformat
			if(ufNameArr && this.findRelImpied){
				for (var b = 0; b < ufNameArr.length; b++) {
					ufName = ufNameArr[b];
					impiedRel = this.findRelImpied(node, ufName);
					if(impiedRel && out.properties.indexOf(impiedRel) === -1) {
						out.properties.push([impiedRel, 'v1']);
					}
				}
			}


			//if(out.root.length === 1 && out.properties.length === 1) {
			//	if(out.root[0].replace('h-','') === this.removePropPrefix(out.properties[0][0])) {
			//		out.typeVersion = 'v2';
			//	}
			//}

			return out;
		}
1119074
function (props, key) {
        if (props[key]) {
            return;
        }
        props[key] = {
            configurable: true,
            enumerable: true,
            writable: true,
            value: function () {
                var error = this[__symbol__('error')];
                var errorMethod = (error && error[key]) || this[key];
                if (errorMethod) {
                    return errorMethod.apply(error, arguments);
                }
            }
        };
    }
527177
public void defineOwnProperties(Context cx, ScriptableObject props) {
        Object[] ids = props.getIds(false, true);
        ScriptableObject[] descs = new ScriptableObject[ids.length];
        for (int i = 0, len = ids.length; i < len; ++i) {
            Object descObj = ScriptRuntime.getObjectElem(props, ids[i], cx);
            ScriptableObject desc = ensureScriptableObject(descObj);
            checkPropertyDefinition(desc);
            descs[i] = desc;
        }
        for (int i = 0, len = ids.length; i < len; ++i) {
            defineOwnProperty(cx, ids[i], descs[i]);
        }
    }
522341
function (props, propName, componentName) {
    // Only accept a single child, of the appropriate type
    //credits: http://www.mattzabriskie.com/blog/react-validating-children
    let prop = props[propName];
    let types = ['svg'];
    if (React.Children.count(prop) !== 1 ||
      types.indexOf(prop.type) === -1) {
      return new Error(
        '`' + componentName + '` ' +
        'should have a single child of the following types: ' +
        ' `' + types.join('`, `') + '`.'
      );
    }
    if (!prop.props.hasOwnProperty('width') || !prop.props.hasOwnProperty('height')) {
      return new Error('SVG should have props `width` and `height`');
    }

  }
107194
private void expectInterfaceProperty(
      Node n, ObjectType instance, ObjectType implementedInterface, String prop) {
    StaticTypedSlot propSlot = instance.getSlot(prop);
    if (propSlot == null) {
      // Not implemented
      String sourceName = n.getSourceFileName();
      sourceName = nullToEmpty(sourceName);
      registerMismatch(
          instance,
          implementedInterface,
          report(
              JSError.make(
                  n,
                  INTERFACE_METHOD_NOT_IMPLEMENTED,
                  prop,
                  implementedInterface.toString(),
                  instance.toString())));
    } else {
      Node propNode =
          propSlot.getDeclaration() == null ? null : propSlot.getDeclaration().getNode();

      // Fall back on the constructor node if we can't find a node for the
      // property.
      propNode = propNode == null ? n : propNode;

      JSType found = propSlot.getType();
      found = found.restrictByNotNullOrUndefined();

      JSType required
          = implementedInterface.getImplicitPrototype().getPropertyType(prop);
      TemplateTypeMap typeMap = implementedInterface.getTemplateTypeMap();
      if (!typeMap.isEmpty()) {
        TemplateTypeMapReplacer replacer = new TemplateTypeMapReplacer(
            typeRegistry, typeMap);
        required = required.visit(replacer);
      }
      required = required.restrictByNotNullOrUndefined();

      if (!found.isSubtype(required, this.subtypingMode)) {
        // Implemented, but not correctly typed
        FunctionType constructor =
            implementedInterface.toObjectType().getConstructor();
        JSError err =
            JSError.make(
                propNode,
                HIDDEN_INTERFACE_PROPERTY_MISMATCH,
                prop,
                instance.toString(),
                constructor.getTopMostDefiningType(prop).toString(),
                required.toString(),
                found.toString());
        registerMismatch(found, required, err);
        report(err);
      }
    }
  }
677681
function child_nodes(node) {
  var properties = NODE_TYPES[node["type"]];

  if (properties === undefined) {
    console.error("FATAL".red + ": Unknown node type: " + node["type"]);
    console.trace();
    process.exit(1);
  }

   var x = properties.map(function(p) {
     return node[p];
   });

   return _.flatten(_.compact(x));
}
1345474
def add_props(self,**kwargs):
        
        for kw,val in kwargs.iteritems():
            self.properties[kw] = val
218611
function PropRep(props) {
  const Grip = require("./grip");
  const { Rep } = require("./rep");

  let { name, mode, equal, suppressQuotes } = props;

  let key;
  // The key can be a simple string, for plain objects,
  // or another object for maps and weakmaps.
  if (typeof name === "string") {
    if (!suppressQuotes) {
      name = maybeEscapePropertyName(name);
    }
    key = span({ className: "nodeName" }, name);
  } else {
    key = Rep({
      ...props,
      className: "nodeName",
      object: name,
      mode: mode || MODE.TINY,
      defaultRep: Grip
    });
  }

  return [
    key,
    span(
      {
        className: "objectEqual"
      },
      equal
    ),
    Rep({ ...props })
  ];
}
516362
function (propType, values) {

	propType.info = Object.assign(
		propType.info ? propType.info : {},
		values
	);

	if (propType.isRequired) {
		propType.isRequired.info = Object.assign(
			propType.isRequired && propType.isRequired.info ? propType.isRequired.info : {},
			values
		);

		propType.isRequired.info.isRequired = true;
		propType.info.isRequired = false;
	}

	return propType;
}
1172727
function createInline(type, props = {}, nodes) {
  const node = { object: 'inline', type, ...props };
  return addNodes(node, nodes);
}
1132854
function Class(superCtor, props){
  let cls = function (...args) {
    if (!(this instanceof cls)) {
      throw new Error('Class constructors cannot be invoked without \'new\'');
    }
    //extend prototype data to instance
    //avoid instance change data to pullte prototype
    cls.extend(cls.__props__, this);
    if(isFunction(this.init)){
      this.__initReturn = this.init(...args);
    }
  };
  cls.__props__ = {};
  cls.extend = function(props, target){
    target = target || cls.prototype;
    let name, value;
    for(name in props){
      value = props[name];
      if (isArray(value)) {
        cls.__props__[name] = target[name] = extend([], value);
      }else if(isObject(value)){
        cls.__props__[name] = target[name] = extend({}, value);
      }else{
        target[name] = value;
      }
    }
    return cls;
  };
  cls.inherits = function(superCtor){
    cls.super_ = superCtor;
    //if superCtor.prototype is not enumerable
    if(Object.keys(superCtor.prototype).length === 0){
      cls.prototype = Object.create(superCtor.prototype, {
        constructor: {
          value: cls,
          enumerable: false,
          writable: true,
          configurable: true
        }
      });
    }else{
      extend(cls.prototype, superCtor.prototype);
    }
    return cls;
  };
  if (!isFunction(superCtor)) {
    props = superCtor;
  }else if (isFunction(superCtor)) {
    cls.inherits(superCtor);
  }
  if (props) {
    cls.extend(props);
  }
  /**
   * invoke super class method
   * @param  {String} name []
   * @param  {Mixed} data []
   * @return {Mixed}      []
   */
  cls.prototype.super = function(name, data){
    if (!this[name]) {
      this.super_c = null;
      return;
    }
    let super_ = this.super_c ? this.super_c.super_ : this.constructor.super_;
    if (!super_ || !isFunction(super_.prototype[name])) {
      this.super_c = null;
      return;
    }
    while(this[name] === super_.prototype[name] && super_.super_){
      super_ = super_.super_;
    }
    this.super_c = super_;
    if (!this.super_t) {
      this.super_t = 1;
    }
    if (!isArray(data) && !isArguments(data)) {
      data = arguments.length === 1 ? [] : [data];
    }
    let t = ++this.super_t, ret, method = super_.prototype[name];
    ret = method.apply(this, data);
    if (t === this.super_t) {
      this.super_c = null;
      this.super_t = 0;
    }
    return ret;
  };
  return cls;
}
566433
function _supportColorProps(props) {
	var p;
	for (p = 0; p < props.length; p += 1) {
		$.fx.step[props[p]] = _animateColor;
	}
}
1039562
function _props (opts, source, target) {
  let idx = opts.visited.indexOf(source) // check for circularities
  if (idx === -1) {
    opts.visited.push(source)
    opts.cloned.push(target)
    Object.getOwnPropertyNames(source).forEach(function (key) {
      if (key === 'prototype') {
        target[key] = Object.create(source[key])
        Object.getOwnPropertyNames(source[key]).forEach(function (p) {
          if (p !== 'constructor') {
            _descriptor(opts, source[key], target[key], p)
            // } else {
            //   target[key][p] = target
            //   Safari may throw here with TypeError: Attempted to assign to readonly property.
          }
        })
      } else {
        _descriptor(opts, source, target, key)
      }
    })
    opts.visited.pop()
    opts.cloned.pop()
  } else {
    target = opts.cloned[idx] // add reference of circularity
  }
  return target
}
641027
function createStyledElement(component, props, children) {
  return (...chunks) => {
    const classNames = chunks.map(chunk => (chunk ? glamor(chunk) : ''))

    if (props) {
      const { innerRef, forwardRef, css, className, ...restProps } = props

      if (css) {
        classNames.push(glamor(css))
      }

      if (className) {
        classNames.push(className)
      }

      return createElement(
        component,
        {
          [forwardRef ? 'innerRef' : 'ref']: innerRef,
          className: classNames.join(' ').trim(),
          ...restProps,
        },
        restProps.children || children
      )
    } else {
      return ({ innerRef, forwardRef, css, className = '', ...restProps }) => {
        const glamorClass = css ? glamor(css) : ''

        return createElement(component, {
          [forwardRef ? 'innerRef' : 'ref']: innerRef,
          className: classNames.concat(glamorClass, className).join(' ').trim(),
          ...restProps,
        })
      }
    }
  }
}
537599
function (propType) {
        return {
            propType: propType,
            preCtorInit: function domProperty_preCtorInit(element, options, data, displayName, propName, value) {
                element[propName] = value;
            },
            update: function domProperty_update(winjsComponent, propName, oldValue, newValue) {
                if (oldValue !== newValue) {
                    winjsComponent.element[propName] = newValue;
                }
            }
        };
    }
186513
function addThisDotProps(path) {
  path.replaceWith(
    t.memberExpression(
      t.memberExpression(t.thisExpression(), t.identifier('props')),
      path.node
    )
  );
}