Iterate string chars.

@param {String} obj
@param {Function} fn
@api private
432312
function string(obj, fn) {
  for (var i = 0; i < obj.length; ++i) {
    fn(obj.charAt(i), i);
  }
}
475489
function forOf (obj, iterate, context) {
  if (obj) {
    context = context || this
    if (isArray(obj)) {
      for (var index = 0, len = obj.length; index < len; index++) {
        if (iterate.call(context, obj[index], index, obj) === false) {
          break
        }
      }
    } else {
      for (var key in obj) {
        if (hasOwnProp(obj, key)) {
          if (iterate.call(context, obj[key], key, obj) === false) {
            break
          }
        }
      }
    }
  }
}
676019
function each(obj, iterator, context) {
    var i;

    if (!obj) {
        return;
    }

    if (obj.forEach) {
        obj.forEach(iterator, context);
    } else if (obj.length !== undefined) {
        i = 0;
        while (i < obj.length) {
            iterator.call(context, obj[i], i, obj);
            i++;
        }
    } else {
        for (i in obj) {
            obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);
        }
    }
}
1328789
function(obj, iterator, context) {
        if (!obj) return
        else if (obj.forEach) obj.forEach(iterator)
        else if (obj.length == +obj.length) {
            for (var i = 0; i < obj.length; i++) iterator.call(context, obj[i], i)
        } else {
            for (var key in obj) iterator.call(context, obj[key], key)
        }
    }
295403
function toFunction(obj) {
  switch ({}.toString.call(obj)) {
    case '[object Object]':
      return objectToFunction(obj);
    case '[object Function]':
      return obj;
    case '[object String]':
      return stringToFunction(obj);
    case '[object RegExp]':
      return regexpToFunction(obj);
    default:
      return defaultToFunction(obj);
  }
}
1322122
function genIterator (obj) {
    if (obj) {
        var gen = obj[_.Promise.Symbol.iterator];
        if (_.isFunction(gen)) {
            return gen.call(obj);
        }

        if (obj instanceof Array) {
            return new ArrIter(obj);
        }

        if (_.isFunction(obj.next)) {
            return obj;
        }
    }
    throw new TypeError('invalid_argument');
}
855918
function prettyPrintJson(obj, indent) {
  var result = '';

  if (indent == null) indent = '';

  for (var property in obj) {
    if (property.charAt(0) !== '_') {
      var value = obj[property];

      if (typeof value === 'string') {
        value = '\'' + value + '\'';
      } else if (typeof value === 'object') {
        if (value instanceof Array) {
          value = '[ ' + value + ' ]';
        } else {
          // Recursive dump
          var od = prettyPrintJson(value, indent + '  ');

          value = '{\n' + od + '\n' + indent + '}';
        }
      }
      result += indent + property + ': ' + value + ',\n';
    }
  }
  return result.replace(/,\n$/, '');
}
261580
function each (iterable, fn) {
        var len
            , i = 0
            , iter
            , item
            , ret
        ;

        if (!iterable) throw genTypeError($invalidArgument);

        var gen = iterable[Symbol[$iterator]];
        if (isFunction(gen))
            iter = gen.call(iterable);
        else if (isFunction(iterable.next)) {
            iter = iterable;
        }
        else if (isInstanceOf(iterable, Arr)) {
            len = iterable.length;
            while (i < len) {
                fn(iterable[i], i++);
            }
            return i;
        } else
            throw genTypeError($invalidArgument);

        while (!(item = iter.next()).done) {
            ret = genTryCatcher(fn)(item.value, i++);
            if (ret === $tryErr) {
                isFunction(iter[$return]) && iter[$return]();
                throw ret.e;
            }
        }

        return i;
    }
1196108
function(obj) {
  for (var item in obj) {
    console.log('  ' + item + ': ' + JSON.stringify(obj[item]));
  }
}
657665
function(obj) {
                if (obj === undefined)
                    return obj + "";
                if (obj === null)
                    return obj + "";
                return Object[LEXICON.p].toString.call(obj).replace(/^\[object (.+)\]$/, '$1').toLowerCase();
            }
926731
function each (obj, fn) {
		const nth = obj.length;
		let i = -1;

		while (++i < nth) {
			if (fn.call(obj, obj[i], i) === false) {
				break;
			}
		}

		return obj;
	}
1259410
function(obj_) {
  var obj = sg.smartAttrs(obj_ || {});

  if (!obj.tags)              { return obj; }

  var arr = obj.tags;
  if (_.isString(obj.tags)) {
    arr = obj.tags.split(/[, ]+/g);
  }

  // Turn a string into tags: 'foo, bar, baz=quxx'
  obj.tags = sg.reduce(arr, {}, function(m, str) {
    var result   = {};
    var parts    = str.split(/[=] ?/g);
    var key      = parts.shift();

    if (parts.length <= 0) {
      return sg.kv(m, key, true);
    }

    return sg.kv(m, key, parts.join('='));
  });

  return obj;
}
955722
function forIn(obj, fn, thisObj){
        var key, i = 0;
        // no need to check if argument is a real object that way we can use
        // it for arrays, functions, date, etc.

        //post-pone check till needed
        if (_hasDontEnumBug == null) { checkDontEnum(); }

        for (key in obj) {
            if (exec(fn, obj, key, thisObj) === false) {
                break;
            }
        }

        if (_hasDontEnumBug) {
            while (key = _dontEnums[i++]) {
                // since we aren't using hasOwn check we need to make sure the
                // property was overwritten
                if (obj[key] !== Object.prototype[key]) {
                    if (exec(fn, obj, key, thisObj) === false) {
                        break;
                    }
                }
            }
        }
    }
557783
def obj_to_string(obj):
    ''''''
    if not obj:
        return None
    elif isinstance(obj, bytes):
        return obj.decode('utf-8')
    elif isinstance(obj, basestring):
        return obj
    elif is_lazy_string(obj):
        return obj.value
    elif hasattr(obj, '__html__'):
        return obj.__html__()
    else:
        return str(obj)
396056
function ( obj ) {
		obj = string.trim( obj );

		return obj.charAt( 0 ).toLowerCase() + obj.slice( 1 );
	}
715054
function stringToBuffer(str) {
    var buf = new Buffer(str.length);
    for (var i = 0; i < buf.length; i++) {
      buf.writeUInt8(str.charCodeAt(i), i);
    }
    return buf;
  }
844977
function (obj, key) {
    var tokens = key.replace(/\{|\}/g, '').split(".") || [],
      currVal = obj || {};
    for (var ix = 0, len = tokens.length; ix < len; ix++) {
      if ((typeof currVal === 'undefined') || (currVal === null)) {
        break;
      }
      var currentToken = tokens[ix];
      currVal = currVal[currentToken];
    }
    return currVal;
  }