function trim(str)
{
/// <summary>Returns a string without left and right whitespace</summary>
/// <param name="str" type="String"> String to parse </param>
/// <returns type="String">Parsed string</returns>
return $.trim(str);
}
function isNullOrEmpty(obj)
{
/// <summary> Returns true if the input is null, undefined, or ''</summary>
/// <param name="obj" type="Object"> Object to test</param>
/// <returns type="Boolean" />
var ret = false;
if (false === isFunction(obj))
{
ret = $.isPlainObject(obj) && $.isEmptyObject(obj);
if (false === ret && isGeneric(obj))
{
ret = (trim(obj) === '');
}
}
return ret;
}
function isGeneric(obj)
{
/// <summary> Returns true if the object is not a function, array, or jQuery object</summary>
/// <param name="obj" type="Object"> Object to test</param>
/// <returns type="Boolean" />
var ret = (false === isFunction(obj) && false === isArray(obj) && false === isJQuery(obj));
return ret;
}
function isFunction(obj)
{
/// <summary> Returns true if the object is a function</summary>
/// <param name="obj" type="Object"> Object to test</param>
/// <returns type="Boolean" />
var ret = ($.isFunction(obj));
return ret;
}
function isArray(obj)
{
/// <summary> Returns true if the object is an array</summary>
/// <param name="obj" type="Object"> Object to test</param>
/// <returns type="Boolean" />
var ret = ($.isArray(obj));
return ret;
}
function isJQuery(obj)
{
var ret = (obj instanceof jQuery);
return ret;
}
function ObjectHelper(obj) {
/// <summary>Find an object in a JSON object.</summary>
/// <param name="obj" type="Object"> Object to search </param>
/// <returns type="ObjectHelper"></returns>
var thisObj = obj;
function recursiveFind(parentObj, key, value) {
/// <summary>Recursively search an object</summary>
/// <param name="parentObj"...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.