Simple Utility Methods for checking information about a value.

@param  {Mixed}  value  Could be anything.
@return {Object}
186762
function is (value) {
  return {
    a: function (check) {
      if (check.prototype) check = check.prototype.constructor.name
      var type = Object.prototype.toString.call(value).slice(8, -1).toLowerCase()
      return value != null && type === check.toLowerCase()
    }
  }
}
335915
function (value) {
        let val = parseInt(value, 10);
        if (isNaN(val)) {
            return false;
        }
        return (val + '').length === value.length;
    }
681775
function ( value ) {
            if ( $B.isObject(value) ) {
                var str = location.search;
    
                str = ( /^\?[^\?\=]+\=/.test(str) )? str + '&' : '?' + str;
    
                for ( var key in value ) {
                    str += key + '=' + value[key] + '&';
                }
    
                return str.replace( /\&$/, '' );
            } else {
                var result = {};
                location.search.replace( /(\w*)\=([^&]*)/g, $B.bind(function ( str, prop, val ) {
                    if ( prop ) result[prop] = $B.string.convertDataType( val );
                }, this));
    
                if ( typeof value === 'string' ) {
                    if ( result[value] ) {
                        result = result[value];
                    } else {
                        result = '';
                    }
                }
    
                return result;
            }
        }
1264345
function (value) {
  /* jshint maxcomplexity:7 */
  // boolean
  if (value === 'true') { return true }
  if (value === 'false') { return false }
  // null
  if (value === 'null') { return null }
  // number
  if (+value + '' === value) { return +value }
  // json
  if (/^[[{]/.test(value)) {
    try {
      return JSON.parse(value)
    } catch (e) {
      return value
    }
  }
  // everything else
  return value
}
282563
function hasProperty(value, prop) {
    return (value && typeof value === 'object' && prop in value) ||
        value !== null && value !== undefined && value[prop] !== undefined;
}
962238
function (value) {
            var ret = false;
            var root = this.__root;
            while (root != null) {
                var cmp = this.compare(value, root.data);
                if (cmp) {
                    root = root[(cmp === -1) ? "left" : "right"];
                } else {
                    ret = true;
                    root = null;
                }
            }
            return ret;
        }
427619
function ignoreValue(value) {
    if (value === null || value === undefined || value.length === 0) {
        return true;
    }
    if (value.length === 0) {
        return true;
    }
    if (typeof (value) === 'object') {
        return false;
    }
    value = value.toLowerCase();
    var ignoreValues = ['not available', 'no information'];
    for (var x = 0; x < ignoreValues.length; x++) {
        if (value.indexOf(ignoreValues[x]) >= 0) {
            return true;
        }
    }
    return false;
}
545895
function(value) {
      
      if (value === "text") {
        value = this.text().trim();
        
      } else if (value === "html") {
        value = this.html().trim();
        
      } else if (value === "val") {
        value = this.val();
      
      } else if (value.indexOf("attr:") === 0) {
        value = this.attr(value.substr(5));
      }
      
      return value;
    }
343442
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
797404
function getFormattedValue(value) {
            let format;

            if (isInteger(value)) {
                format = formatIntegerValue;
            } else {
                format = formatDecimalValue;
            }

            return format(value);
        }
744326
def getValueFromValue(value):
    
    if type(value) != common.AttributeValue:
        raise TypeError(
            "Expected an AttributeValue, but got {}".format(type(value)))
    if value.WhichOneof("value") is None:
        raise AttributeError("Nothing set for {}".format(value))
    return getattr(value, value.WhichOneof("value"))
419655
function parseCustomValue(value, parse) {
  try {
    let parsed = parse(value)
    if (parsed === undefined) {
      return { value: null }
    }
    return { value: parsed }
  } catch (error) {
    return { error: error.message }
  }
}
154867
function isArgumentsLike( value ) {
	return value !== null &&
	typeof value === 'object' &&
	typeof value.length === 'number' &&
	value.length >= 0 &&
	hasOwn.call( value, 'callee' ) &&
	!isEnumerable.call( value, 'callee' );
}
808465
function checkValue(value, test, topData) {
  return _.every(test, function (val, operator) {
    val = getRef(val, topData);
    if (operator === '$eq') {
      if (_.isArray(value) && !_.isArray(val)) {
        return value.indexOf(val) > -1;
      }
      return _.isEqual(value, val);
    }
    if (operator === '$ne') {
      return !_.isEqual(value, val);
    }
    if (operator === '$gt') {
      return value > val;
    }
    if (operator === '$gte') {
      return value >= val;
    }
    if (operator === '$lt') {
      return value < val;
    }
    if (operator === '$lte') {
      return value <= val;
    }
    if (operator === '$in') {
      if (!_.isArray(val)) {
        throw new Error('$in must be an array');
      }
      if (_.isArray(value)) {
        return _.find(value, function (v) {
          return inArray(v, val, topData);
        })
      }
      return inArray(value, val, topData);
    }
    if (operator === '$nin') {
      if (!_.isArray(val)) {
        throw new Error('$nin must be an array');
      }
      if (_.isArray(value)) {
        return _.every(value, function (v) {
          return !inArray(v, val, topData);
        })
      }
      return !inArray(value, val, topData);
    }
    if (operator === '$not') {
      if (val instanceof RegExp) {
        return !(typeof value === 'string' && val.test(value));
      } else if (isExpression(val)) {
        return !checkValue(value, val, topData);
      } else {
        throw new Error('$not needs a regex or a document');
      }
    }
    if (operator === '$regex') {
      if (test.$options !== undefined && typeof test.$options !== 'string') {
        throw new Error('$options has to be a string');
      }
      if (typeof val === 'string') {
        val = new RegExp(val, test.$options);
      } else if (val instanceof RegExp) {
        if (test.$options) {
          val.compile(val.source, test.$options);
        }
      } else {
        throw new Error('$regex has to be a string or RegExp');
      }
      if (typeof value === 'string') {
        return val.test(value);
      }
      return false;
    }
    if (operator === '$options') {
      if (!test.$regex) {
        throw new Error('$options needs a $regex');
      }
      return true;
    }

    if (operator === '$all') {
      if (!_.isArray(val)) {
        throw new Error('$all has to be an array');
      }
      if (!val.length) return false;
      for (var i in val) {
        var el = val[i];
        if (_.isArray(el)) {
          return _.isEqual(el, value);
        }
        if (isExpression(el)) {
          if (!el.$elemMatch) {
            throw new Error('no $ expressions in $all');
          }
          // $all with $elemMatch
          return _.find(value, function (v) {
            return checkDepends(el.$elemMatch, v, topData);
          });
        }
        if (!findArrayElement(value, el, topData)) {
          return false;
        }
      }
      return true;
    }

    if (operator === '$elemMatch') {
      if (!operator || typeof val !== 'object') {
        throw new Error('$elemMatch needs an Object');
      }
      if (!_.isArray(value)) return false;
      if (isExpression(val)) {
        return _.find(value, function (v) {
          return checkValue(v, val, topData);
        });
      }
      // Object
      return _.find(value, function (v) {
        return checkDepends(val, v, topData);
      });
    }

    if (operator === '$size') {
      if (typeof val !== 'number') {
        throw new Error('$size needs an number');
      }
      return _.isArray(value) && value.length === val;
    }

    if (operator === '$exists') {
      if (typeof val !== 'boolean') {
        throw new Error('$exists needs a boolean');
      }
      var res = value === undefined;
      return val ? !res : res;
    }
    throw new Error('unsupported comparison operator: ' + operator);
  })
}
695117
function parseValue(value) {
        if (['true', 'false'].indexOf(value) !== -1) {
            return value === 'true';
        }
        // is it float parsable?
        var parsed = parseFloat(value);
        if (!isNaN(parsed)) {
            return parsed;
        }
        return value;
    }
36060
function(value) {
      return (angular.isUndefined(value) || value === null) || Object.keys(value).length === 0;
    }
1372416
function(value){
            for(var i = this.targets.length - 1; i >= 0; i--){
                var target = this.targets[i];
                if(target.value === value){
                    return target;
                }
            }
        }