@function
@public

Objectify the object/error and its properties.

@param {Object|Error} obj The object to be parsed
@returns {string} The parsed error
439073
function objectify (obj) {
  return JSON.parse(JSON.stringify(obj, Object.getOwnPropertyNames(obj)))
}
473473
function parseValues(obj) {
        Object.keys(obj).forEach(function (key) {
            obj[key] = parseValue(obj[key]);
        });
        return obj;
    }
766724
function (obj, fn) {
        for (var i in obj) {
            if (typeof obj[i] === 'object') {
                obj[i] = parse(obj[i], fn);
            } else {
                obj[i] = fn(obj[i], i);
            }
        }
        return obj;
    }
964762
function cleanObject(obj) {
  if (obj.$t !== undefined) {
    let keysLength = Object.keys(obj).length;
    if (keysLength === 1 || (keysLength === 2 && obj.type !== undefined)) {
      return obj.$t;
    } else {
      obj.text = obj.$t;
      delete obj.$t;
    }
  }

  return obj;
}
1064013
function JModelError(obj) {
    this.message = obj['message'];
    this.propertyName = obj['propertyName'];

    Error.call(this);
    Error.captureStackTrace(this, this.constructor);
}
315961
function (obj) {
        "use strict";

        if (Object.getPrototypeOf(obj) !== Object.prototype) {
            throw Error("obj must be an Object");
        }

        return Object.keys(obj)[0] || null;
    }
467682
function formatObject(o) {
		var s = String(o);
		if(s === '[object Object]' && typeof JSON !== 'undefined') {
			s = tryStringify(o, s);
		}
		return s;
	}
84777
function ( obj ) {
		return obj.nodeName === "FORM" ? validate.test( obj ) : !string.isEmpty( obj.value || element.text( obj ) );
	}
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;
		}
989686
function normalize(obj) {
  if (obj === null || typeof obj !== 'object') {
    return JSON.stringify(obj);
  }
  if (obj instanceof Array) {
    return '[' + obj.map(normalize).join(', ') + ']';
  }
  var answer = '{';
  for (var key of Object.keys(obj).sort()) {
    answer += key + ': ';
    answer += normalize(obj[key]);
    answer += ', ';
  }
  answer += '}';
  return answer;
}
311243
function objectToError (obj) {
  var temp = new Error('')
  var props = Object.keys(obj)

  for (var i = 0; i < props.length; i++) {
    temp[props[i]] = obj[props[i]]
  }

  return temp
}
1135712
function assertAsDefined(obj, errorMsg) {
  if (_.isUndefined(obj) || _.isNull(obj)) {
    throw new Error(errorMsg);
  }
}
917614
function normalize(obj) {
    var result = {}, fieldDefine, value;
    for(var field in options) {
      fieldDefine = options[field];
      value = obj[field];
      value = castValue(fieldDefine, value, obj);
      validateValue(fieldDefine, value, field);
      if(value != null) {
        // ignore null value
        result[field] = value;
      }
    }
    return result;
  }
1238115
function format (obj) {
  if (!obj || typeof obj !== 'object') {
    throw new TypeError('argument obj is required')
  }

  var subtype = obj.subtype
  var suffix = obj.suffix
  var type = obj.type

  if (!type || !TYPE_NAME_REGEXP.test(type)) {
    throw new TypeError('invalid type')
  }

  if (!subtype || !SUBTYPE_NAME_REGEXP.test(subtype)) {
    throw new TypeError('invalid subtype')
  }

  // format as type/subtype
  var string = type + '/' + subtype

  // append +suffix
  if (suffix) {
    if (!TYPE_NAME_REGEXP.test(suffix)) {
      throw new TypeError('invalid suffix')
    }

    string += '+' + suffix
  }

  return string
}
434282
function( obj ) {
					if ( obj == null ) {
						obj = promise;
					} else {
						for ( var key in promise ) {
							obj[ key ] = promise[ key ];
						}
					}
					return obj;
				}
558022
function typeOf(obj) {
        if (obj === undefined) {
            return 'undefined';
        }

        if (obj === null) {
            return 'null';
        }

        var t = Object.prototype.toString.call(obj).match(/\s([a-z|A-Z]+)/)[1].toLowerCase(),
            m;

        if (t !== 'object') {
            return t;
        }

        m = obj.constructor.toString().match(/^function\s*([$A-Z_][0-9A-Z_$]*)/i);
        if (m === null) {
            return 'object';
        }

        return m[1];
    }
1354396
function objectToArray(obj) {
        if (!validateHelpers.isPlainObject(obj)) {
            throw new Error('\'obj\' must be a plain object');
        }

        return Object.keys(obj).map(function (key) {
            return obj[key];
        });
    }