coerce every string in the given object / array
199696
function coerceAll (obj) {
  var type = Array.isArray(obj) ? 'array' : typeof obj;
  var i;
  var n;

  switch (type) {
    case 'string':
      return coerce(obj);
    case 'object':
      if (obj) {
        var props = Object.keys(obj);
        for (i = 0, n = props.length; i < n; i++) {
          var key = props[i];
          obj[key] = coerceAll(obj[key]);
        }
      }
      break;
    case 'array':
      for (i = 0, n = obj.length; i < n; i++) {
        coerceAll(obj[i]);
      }
      break;
  }

  return obj;
}
196923
function _eachProperty(obj, fn) {
  let ret = true
  for (const prop in obj) {
    if (obj.hasOwnProperty(prop)) {
      ret = fn(obj[prop], prop, obj)
      if (ret === false) {
        break
      }
    }
  }
  return ret
}
355251
function ( obj, arg ) {
		array.each( arg.replace( /\]$/, "" ).replace( /\]/g, "." ).replace( /\.\./g, "." ).split( /\.|\[/ ), function ( i ) {
			obj = obj[i];
		});

		return obj;
	}
1163151
function each(object, callback) {
    var index = -1,
        length = object ? object.length : 0;

    if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {
      while (++index < length) {
        callback(object[index], index, object);
      }
    } else {
      forOwn(object, callback);
    }
  }
415428
function toObject(input, obj) {
    if (isString(input)) {
        input = obj(input);
    }
    if (typeof input !== 'object') {
        throw new TypeError('Input must be an object or string.');
    }
    return input;
}
755877
function ( arg, qstring ) {
		var obj    = {},
		    result = qstring !== undefined ? ( qstring.indexOf( "?" ) > -1 ? qstring.replace( /.*\?/, "" ) : null) : ( server || string.isEmpty( location.search ) ? null : location.search.replace( "?", "" ) );

		if ( result !== null && !string.isEmpty( result ) ) {
			result = result.split( "&" );
			array.each( result, function (prop ) {
				var item = prop.split( "=" );

				if ( string.isEmpty( item[0] ) ) {
					return;
				}

				if ( item[1] === undefined ) {
					item[1] = "";
				}
				else {
					item[1] = utility.coerce( decodeURIComponent( item[1] ) );
				}

				if ( obj[item[0]] === undefined ) {
					obj[item[0]] = item[1];
				}
				else if ( !(obj[item[0]] instanceof Array) ) {
					obj[item[0]] = [obj[item[0]]];
					obj[item[0]].push( item[1] );
				}
				else {
					obj[item[0]].push( item[1] );
				}
			});
		}

		if ( arg !== null && arg !== undefined ) {
			obj = obj[arg];
		}

		return obj;
	}
1183575
function stringify(obj) {
  return Object.keys(obj || {})
    .reduce(function(str, prop){
      return str += ''
        + (str ? ' ' : '')
        + prop
        + ': '
        + obj[prop]
        + ';';
    }, '');
}
160641
function(obj) {
			var result = {};
			var keys = this.toArray(arguments, 1);
			Object.keys(obj).forEach(function(key) {
				if (~keys.indexOf(key)) {
					result[key] = obj[key];
				}
			});
			return result;
		}
1293246
function ( obj, arg ) {
		arg = arg || 1;

		if ( arg < 1 ) {
			arg = 1;
		}

		return array.limit( obj, arg, obj.length );
	}
188740
function forEachObject(fn, object) {
  const keys = Object.keys(object);

  let index = -1,
      key;

  while (++index < keys.length) {
    key = keys[index];

    fn(object[key], key, object);
  }

  return object;
}
335435
function objectToString(object, tabs) {
            var result = [];
            var keys = Object.keys(object);

            keys.forEach(function (key, keyIndex) {
                var line;
                var formatedKey;

                if (-1 < key.indexOf('@')) {
                    formatedKey = '\'' + key + '\'';
                } else {
                    formatedKey = key;
                }

                if (typeof object[key] === 'object') {
                    if (Array.isArray(object[key])) {
                        var newTabs = (tabs + 1);

                        line = getTabs(tabs) + '' + formatedKey + ': [';

                        object[key].forEach(function (item, itemIndex) {
                            if (typeof item === 'object') {
                                line += "\n" + getTabs(newTabs) + '{';
                                line += "\n" + objectToString(item, (newTabs + 1));
                                line += "\n" + getTabs(newTabs) + '}';
                            } else if (typeof item === 'string') {
                                line += "\n" + getTabs(newTabs) + '\'' + addslashes(item) + '\'';
                            } else if (typeof item === 'boolean') {
                                line += "\n" + getTabs(newTabs) + '' + item;
                            } else if (typeof item === 'number') {
                                line += "\n" + getTabs(newTabs) + '' + item;
                            }

                            if (itemIndex < (object[key].length - 1)) {
                                line += ',';
                            }
                        });

                        line += "\n" + getTabs(tabs) + ']';
                    } else {
                        line = getTabs(tabs) + '' + formatedKey + ': {' + "\n";
                        line += objectToString(object[key], (tabs + 1));
                        line += "\n" + getTabs(tabs) + '}';
                    }
                } else if (typeof object[key] === 'string') {
                    line = getTabs(tabs) + '' + formatedKey + ': \'' + addslashes(object[key]) + '\'';
                } else if (typeof object[key] === 'boolean') {
                    line = getTabs(tabs) + '' + formatedKey + ': ' + object[key];
                } else if (typeof object[key] === 'number') {
                    line = getTabs(tabs) + '' + formatedKey + ': ' + object[key];
                }

                if (keyIndex < (keys.length - 1)) {
                    line += ',';
                }

                result.push(line);
            });

            return result.join("\n");
        }
464995
function each(obj, callback) {
        var length = obj.length;

        if (length === undefined) {
            for (var name in obj) {
                if (obj.hasOwnProperty(name)) {
                    if (callback.call(obj[name], obj[name], name) === false) {
                        break;
                    }
                }
            }
        } else {
            for (var i = 0; i < length; i++) {
                if (callback.call(obj[i], obj[i], i) === false) {
                    break;
                }
            }
        }
    }
530123
def coerce(cls, key, value):
        """"""

        if not isinstance(value, MutableDict):
            if isinstance(value, dict):
                return MutableDict(value)
            elif isinstance(value, six.string_types):
                # Assume JSON string
                if value:
                    return MutableDict(simplejson.loads(value, use_decimal=True))
                else:
                    return MutableDict()  # Empty value is an empty dict

            # this call will raise ValueError
            return Mutable.coerce(key, value)
        else:
            return value
264657
function _every (arr, iterator) {
  for (var i = 0; i < arr.length; i += 1) {
    if (iterator(arr[i], i, arr) === false) {
      return;
    }
  }
}
1281130
function _coerceObjectType(obj, objHint){
  if(objHint){
    switch(objHint){
      case 'string':
        //Response that comes back is application/octet-stream, which we will return raw
        return obj;
      case 'buffer':
        return Buffer.from(obj, 'utf8');
      case 'number':
        var num = Number(obj);
        if(isNaN(num)){
          throw new TypeError("'number was requested as a type, but result is NaN!");
        }
        return num;
      case 'array':
        try{
          var pObj = JSON.parse(obj);
          if(pObj[0] == undefined){
            //Is an object, not an array, so we will construct an array of just this object
            return new Array(pObj);
          }
          return pObj;
        }catch(ex){
          //If it fails, then it is likely a single string, lets coerce it to an array
          return new Array(obj);
        }
      case 'boolean':
        //Today's javascript fun-fact: 'false' is truthy!
        if(obj == 'false'){
          return false;
        }
        return Boolean(obj);
      case 'object':
         try{
          var pObj = JSON.parse(obj);
          return pObj;
        }catch(ex){
          //If it fails, then just throw back the object
          return obj;
        }
        break;
    }
  }else{
    return _bestGuessObject(obj);
  }
}
339954
function each(obj, cb) {
      if (!obj)
        return;

      if (!Array.isArray(obj) && typeof obj === "object")
        obj = Object.keys(obj);

      obj.forEach(cb);
    }
1245773
function objectToLowercase(obj) {
  var result = {};
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) {
      result[key.toLowerCase()] = obj[key];
    }
  }
  return result;
}