used for destructuring forms, since we don't transform() them
4591
void decompileArrayLiteral(ArrayLiteral node) {
        decompiler.addToken(Token.LB);
        List<AstNode> elems = node.getElements();
        int size = elems.size();
        for (int i = 0; i < size; i++) {
            AstNode elem = elems.get(i);
            decompile(elem);
            if (i < size - 1) {
                decompiler.addToken(Token.COMMA);
            }
        }
        decompiler.addToken(Token.RB);
    }
1258497
function pruneIds(form) {
  var testForm = _.clone(form);
  testForm.pages = _.map(testForm.pages, function(page) {
    page.fields = _.map(page.fields, function(field) {
      return _.omit(field, '_id');
    });

    return _.omit(page, '_id');
  });

  return _.omit(testForm, '_id');
}
1098782
function (obj) {
        var formData = new FormData();
        _.forOwn(obj, function (value, key) {
            _.isArray(value) ? _.forEach(value, function (eachValue) {
                formData.append(key, eachValue)
            }) : formData.append(key, value);
        });
        return {
            body: formData
        };
    }
348324
function unwrap(attrVal) {
  var result = {};
  for (var key in attrVal) {
    if(attrVal.hasOwnProperty(key)) {
      var value = attrVal[key];
      if (value !== null && typeof value !== 'undefined') 
        result[key] = unwrap1(attrVal[key]);
    }
  }
  return result;
}
905458
function unwrapBraceExpressions(dependentKeys) {
  const braceExpressionRegexp = /{.+}/g;

  const unwrappedExpressions = dependentKeys.map((key) => {
    if (typeof key !== 'string' || !braceExpressionRegexp.test(key)) return key;

    const braceExpansionPart = key.match(braceExpressionRegexp)[0];
    const prefix = key.replace(braceExpansionPart, '');
    const properties = braceExpansionPart
      .replace('{', '')
      .replace('}', '')
      .split(',');

    return properties.map(property => `${prefix}${property}`);
  });

  return unwrappedExpressions
    .reduce((acc, cur) => acc.concat(cur), []);
}
389690
def flatten(l):
    '''  '''
    for el in l:
        if isinstance(el, collections.Iterable) and not isinstance(el, string_types):
            for sub in flatten(el):
                yield sub
        else:
            yield el
437657
function handleYield(forms) {
    var yieldType = sl.valueOf(forms[0]); // "yield" or "yield*"
    if (forms.length != 2) {
      forms.error(yieldType + " expects a single expression");
    }
    this.indent += this.indentSize;
    this.transpileSubExpressions(forms);

    var generated = sl.generated();
    generated.push([yieldType, " ", forms[1]]);
    this.indent -= this.indentSize;
    return generated;
}
315343
function transformElement( that, element ) {
		var transformations = that._.transformations[ element.name ],
			i;

		if ( !transformations )
			return;

		populateProperties( element );

		for ( i = 0; i < transformations.length; ++i )
			applyTransformationsGroup( that, element, transformations[ i ] );

		// Do not count on updateElement() which is called in processElement, because it:
		// * may not be called,
		// * may skip some properties when all are marked as valid.
		updateAttributes( element );
	}
906519
function convertOutline (jstruct) { //7/16/14 by DW
				var theNewOutline = {}, atts, subs;
				if (jstruct ["source:outline"] != undefined) {
					if (jstruct ["@"] != undefined) {
						atts = jstruct ["@"];
						subs = jstruct ["source:outline"];
						}
					else {
						atts = jstruct ["source:outline"] ["@"];
						subs = jstruct ["source:outline"] ["source:outline"];
						}
					}
				else {
					atts = jstruct ["@"];
					subs = undefined;
					}
				for (var x in atts) {
					theNewOutline [x] = atts [x];
					}
				if (subs != undefined) {
					theNewOutline.subs = [];
					if (subs instanceof Array) {
						for (var i = 0; i < subs.length; i++) {
							theNewOutline.subs [i] = convertOutline (subs [i]);
							}
						}
					else {
						theNewOutline.subs = [];
						theNewOutline.subs [0] = {};
						for (var x in subs ["@"]) {
							theNewOutline.subs [0] [x] = subs ["@"] [x];
							}
						}
					}
				return (theNewOutline);
				}
482014
def unescape_form(str)
      str = str.dup
      binary_encode(str)
      str.gsub!(/\+/, ' ')
      str.gsub(ESCAPED) { $1.hex.chr }
    end
423293
function ( count, forms ) {
			var pluralRules,
				pluralFormIndex,
				index,
				explicitPluralPattern = new RegExp('\\d+=', 'i'),
				formCount,
				form;

			if ( !forms || forms.length === 0 ) {
				return '';
			}

			// Handle for Explicit 0= & 1= values
			for ( index = 0; index < forms.length; index++ ) {
				form = forms[index];
				if ( explicitPluralPattern.test( form ) ) {
					formCount = parseInt( form.substring( 0, form.indexOf( '=' ) ), 10 );
					if ( formCount === count ) {
						return ( form.substr( form.indexOf( '=' ) + 1 ) );
					}
					forms[index] = undefined;
				}
			}

			forms = $.map( forms, function ( form ) {
				if ( form !== undefined ) {
					return form;
				}
			} );

			pluralRules = this.pluralRules[$.i18n().locale];

			if ( !pluralRules ) {
				// default fallback.
				return ( count === 1 ) ? forms[0] : forms[1];
			}

			pluralFormIndex = this.getPluralForm( count, pluralRules );
			pluralFormIndex = Math.min( pluralFormIndex, forms.length - 1 );

			return forms[pluralFormIndex];
		}
47110
def destructuring_stmt_handle(self, original, loc, tokens):
        """"""
        internal_assert(len(tokens) == 2, "invalid destructuring assignment tokens", tokens)
        matches, item = tokens
        out = match_handle(loc, [matches, "in", item, None])
        out += self.pattern_error(original, loc, match_to_var, match_check_var)
        return out
585180
def render_form(form, **kwargs):
    
    renderer_cls = get_form_renderer(**kwargs)
    return renderer_cls(form, **kwargs).render()
1160437
function ( obj ) {
		return obj.nodeName === "FORM" ? false : string.isEmpty( obj.value || element.text( obj ) );
	}
1077752
function BunnyFormData(form) {
    if (!(form instanceof HTMLFormElement)) {
        throw new Error('Form passed to BunnyFormData constructor is not an instance of HTMLFormElement');
    }

    // form
    this._form = form;

    // form control collection;
    this._collection = {};

    // build collection from form elements
    var elements = this.getInputs();
    for (var k = 0; k < elements.length; k++) {
        var input = elements[k];
        this._initSingleInput(input);
    }
}
36342
function () {
            // aligning non added elements is expensive
            if (!this.added) {
                this.alignOnAdd = true;
                return;
            }

            var wrapper = this,
              renderer = wrapper.renderer,
              elem = wrapper.element,
              translateX = wrapper.translateX || 0,
              translateY = wrapper.translateY || 0,
              x = wrapper.x || 0,
              y = wrapper.y || 0,
              align = wrapper.textAlign || 'left',
              alignCorrection = { left: 0, center: 0.5, right: 1 }[align],
              shadows = wrapper.shadows;

            // apply translate
            css(elem, {
                marginLeft: translateX,
                marginTop: translateY
            });
            if (shadows) { // used in labels/tooltip
                each(shadows, function (shadow) {
                    css(shadow, {
                        marginLeft: translateX + 1,
                        marginTop: translateY + 1
                    });
                });
            }

            // apply inversion
            if (wrapper.inverted) { // wrapper is a group
                each(elem.childNodes, function (child) {
                    renderer.invertChild(child, elem);
                });
            }

            if (elem.tagName === 'SPAN') {

                var width,
                  rotation = wrapper.rotation,
                  baseline,
                  textWidth = pInt(wrapper.textWidth),
                  currentTextTransform = [rotation, align, elem.innerHTML, wrapper.textWidth].join(',');

                if (currentTextTransform !== wrapper.cTT) { // do the calculations and DOM access only if properties changed


                    baseline = renderer.fontMetrics(elem.style.fontSize).b;

                    // Renderer specific handling of span rotation
                    if (defined(rotation)) {
                        wrapper.setSpanRotation(rotation, alignCorrection, baseline);
                    }

                    width = pick(wrapper.elemWidth, elem.offsetWidth);

                    // Update textWidth
                    if (width > textWidth && /[ \-]/.test(elem.textContent || elem.innerText)) { // #983, #1254
                        css(elem, {
                            width: textWidth + PX,
                            display: 'block',
                            whiteSpace: 'normal'
                        });
                        width = textWidth;
                    }

                    wrapper.getSpanCorrection(width, baseline, alignCorrection, rotation, align);
                }

                // apply position with correction
                css(elem, {
                    left: (x + (wrapper.xCorr || 0)) + PX,
                    top: (y + (wrapper.yCorr || 0)) + PX
                });

                // force reflow in webkit to apply the left and top on useHTML element (#1249)
                if (isWebKit) {
                    baseline = elem.offsetHeight; // assigned to baseline for JSLint purpose
                }

                // record current text transform
                wrapper.cTT = currentTextTransform;
            }
        }
1080123
function unwrapElements(parent, wrapper) {
  var el = wrapper.childNodes[0];

  // ok, so this looks weird, right?
  // turns out, appending nodes to another node will remove them
  // from the live NodeList, so we can keep iterating over the
  // first item in that list and grab all of them. Nice!
  while (el) {
    parent.appendChild(el);
    el = wrapper.childNodes[0];
  }

  parent.removeChild(wrapper);
}