code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
anim = this,
orig = {},
style = elem.style,
hidden = elem.nodeType && isHidden( elem ),
dataShow = data_priv.get( elem, "fxshow" );
// Handle queue: false pr... | Try to determine the default display value of an element
@param {String} nodeName | defaultPrefilter | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
name = jQuery.camelCase( index );
easing = specialEasing[ name ];
value = props[ index ];
if ( jQuery.isArray( value ) ) {
easing = value[ 1 ];... | Try to determine the default display value of an element
@param {String} nodeName | propFilter | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
deferred = jQuery.Deferred().always( function() {
// Don't match elem in the :animated selector
delete tick.elem;
}),
tick = function() {
if ( stopped ) {
return false;
}
... | Try to determine the default display value of an element
@param {String} nodeName | Animation | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
tick = function() {
if ( stopped ) {
return false;
}
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
// Support: Android 2.3
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
temp = remaining /... | Try to determine the default display value of an element
@param {String} nodeName | tick | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
doAnimation = function() {
// Operate on a copy of prop so per-property easing won't be lost
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
// Empty animations, or finishing resolves immediately
if ( empty || data_priv.get( this, "finish" ) ) {
anim.stop( true );
}
} | Try to determine the default display value of an element
@param {String} nodeName | doAnimation | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
} | Try to determine the default display value of an element
@param {String} nodeName | stopQueue | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function addToPrefiltersOrTransports( structure ) {
// dataTypeExpression is optional and defaults to "*"
return function( dataTypeExpression, func ) {
if ( typeof dataTypeExpression !== "string" ) {
func = dataTypeExpression;
dataTypeExpression = "*";
}
var dataType,
i = 0,
dataTypes = dataTypeE... | Try to determine the default display value of an element
@param {String} nodeName | addToPrefiltersOrTransports | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
var inspected = {},
seekingTransport = ( structure === transports );
function inspect( dataType ) {
var selected;
inspected[ dataType ] = true;
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {... | Try to determine the default display value of an element
@param {String} nodeName | inspectPrefiltersOrTransports | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function inspect( dataType ) {
var selected;
inspected[ dataType ] = true;
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !insp... | Try to determine the default display value of an element
@param {String} nodeName | inspect | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function ajaxExtend( target, src ) {
var key, deep,
flatOptions = jQuery.ajaxSettings.flatOptions || {};
for ( key in src ) {
if ( src[ key ] !== undefined ) {
( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
}
}
if ( deep ) {
jQuery.extend( true, target, deep );
}
retur... | Try to determine the default display value of an element
@param {String} nodeName | ajaxExtend | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function ajaxHandleResponses( s, jqXHR, responses ) {
var ct, type, finalDataType, firstDataType,
contents = s.contents,
dataTypes = s.dataTypes;
// Remove auto dataType and get content-type in the process
while ( dataTypes[ 0 ] === "*" ) {
dataTypes.shift();
if ( ct === undefined ) {
ct = s.mimeType ||... | Try to determine the default display value of an element
@param {String} nodeName | ajaxHandleResponses | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function ajaxConvert( s, response, jqXHR, isSuccess ) {
var conv2, current, conv, tmp, prev,
converters = {},
// Work with a copy of dataTypes in case we need to modify it for conversion
dataTypes = s.dataTypes.slice();
// Create converters map with lowercased keys
if ( dataTypes[ 1 ] ) {
for ( conv in s.co... | Try to determine the default display value of an element
@param {String} nodeName | ajaxConvert | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Called once
if ( state === 2 ) {
return;
}
// State is "done" now
state = 2;
// Clear timeout if it exists
if ( timeoutTimer ) {
cle... | Try to determine the default display value of an element
@param {String} nodeName | done | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function buildParams( prefix, obj, traditional, add ) {
var name;
if ( jQuery.isArray( obj ) ) {
// Serialize array item.
jQuery.each( obj, function( i, v ) {
if ( traditional || rbracket.test( prefix ) ) {
// Treat each array item as a scalar.
add( prefix, v );
} else {
// Item is non-scalar ... | Try to determine the default display value of an element
@param {String} nodeName | buildParams | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
add = function( key, value ) {
// If value is a function, invoke it and return its value
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
} | Try to determine the default display value of an element
@param {String} nodeName | add | javascript | sdelements/lets-chat | media/js/vendor/jquery/jquery.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/jquery/jquery.js | MIT |
function baseIndexOf(array, value, fromIndex) {
var index = (fromIndex || 0) - 1,
length = array ? array.length : 0;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
} | The base implementation of `_.indexOf` without support for binary searches
or `fromIndex` constraints.
@private
@param {Array} array The array to search.
@param {*} value The value to search for.
@param {number} [fromIndex=0] The index to search from.
@returns {number} Returns the index of the matched value or `-1`. | baseIndexOf | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function cacheIndexOf(cache, value) {
var type = typeof value;
cache = cache.cache;
if (type == 'boolean' || value == null) {
return cache[value] ? 0 : -1;
}
if (type != 'number' && type != 'string') {
type = 'object';
}
var key = type == 'number' ? value : keyPrefix + value;
... | An implementation of `_.contains` for cache objects that mimics the return
signature of `_.indexOf` by returning `0` if the value is found, else `-1`.
@private
@param {Object} cache The cache object to inspect.
@param {*} value The value to search for.
@returns {number} Returns `0` if `value` is found, else `-1`. | cacheIndexOf | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function cachePush(value) {
var cache = this.cache,
type = typeof value;
if (type == 'boolean' || value == null) {
cache[value] = true;
} else {
if (type != 'number' && type != 'string') {
type = 'object';
}
var key = type == 'number' ? value : keyPrefix + value,
... | Adds a given value to the corresponding cache object.
@private
@param {*} value The value to add to the cache. | cachePush | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function charAtCallback(value) {
return value.charCodeAt(0);
} | Used by `_.max` and `_.min` as the default callback when a given
collection is a string value.
@private
@param {string} value The character to inspect.
@returns {number} Returns the code unit of given character. | charAtCallback | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function compareAscending(a, b) {
var ac = a.criteria,
bc = b.criteria,
index = -1,
length = ac.length;
while (++index < length) {
var value = ac[index],
other = bc[index];
if (value !== other) {
if (value > other || typeof value == 'undefined') {
... | Used by `sortBy` to compare transformed `collection` elements, stable sorting
them in ascending order.
@private
@param {Object} a The object to compare to `b`.
@param {Object} b The object to compare to `a`.
@returns {number} Returns the sort order indicator of `1` or `-1`. | compareAscending | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function createCache(array) {
var index = -1,
length = array.length,
first = array[0],
mid = array[(length / 2) | 0],
last = array[length - 1];
if (first && typeof first == 'object' &&
mid && typeof mid == 'object' && last && typeof last == 'object') {
return false... | Creates a cache object to optimize linear searches of large arrays.
@private
@param {Array} [array=[]] The array to search.
@returns {null|Object} Returns the cache object or `null` if caching should not be used. | createCache | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function escapeStringChar(match) {
return '\\' + stringEscapes[match];
} | Used by `template` to escape characters for inclusion in compiled
string literals.
@private
@param {string} match The matched character to escape.
@returns {string} Returns the escaped character. | escapeStringChar | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function getArray() {
return arrayPool.pop() || [];
} | Gets an array from the array pool or creates a new one if the pool is empty.
@private
@returns {Array} The array from the pool. | getArray | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function getObject() {
return objectPool.pop() || {
'array': null,
'cache': null,
'criteria': null,
'false': false,
'index': 0,
'null': false,
'number': null,
'object': null,
'push': null,
'string': null,
'true': false,
'undefined': false,
... | Gets an object from the object pool or creates a new one if the pool is empty.
@private
@returns {Object} The object from the pool. | getObject | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isNode(value) {
// IE < 9 presents DOM nodes as `Object` objects except they have `toString`
// methods that are `typeof` "string" and still can coerce nodes to strings
return typeof value.toString != 'function' && typeof (value + '') == 'string';
} | Checks if `value` is a DOM node in IE < 9.
@private
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a DOM node, else `false`. | isNode | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function releaseArray(array) {
array.length = 0;
if (arrayPool.length < maxPoolSize) {
arrayPool.push(array);
}
} | Releases the given array back to the array pool.
@private
@param {Array} [array] The array to release. | releaseArray | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function releaseObject(object) {
var cache = object.cache;
if (cache) {
releaseObject(cache);
}
object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null;
if (objectPool.length < maxPoolSize) {
objectPool.push(object);
}
} | Releases the given object back to the object pool.
@private
@param {Object} [object] The object to release. | releaseObject | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function slice(array, start, end) {
start || (start = 0);
if (typeof end == 'undefined') {
end = array ? array.length : 0;
}
var index = -1,
length = end - start || 0,
result = Array(length < 0 ? 0 : length);
while (++index < length) {
result[index] = array[start + index... | Slices the `collection` from the `start` index up to, but not including,
the `end` index.
Note: This function is used instead of `Array#slice` to support node lists
in IE < 9 and to ensure dense arrays are returned.
@private
@param {Array|Object|string} collection The collection to slice.
@param {number} start The st... | slice | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function runInContext(context) {
// Avoid issues with some ES3 environments that attempt to use values, named
// after built-in constructors like `Object`, for the creation of literals.
// ES5 clears this up by stating that literals must use built-in constructors.
// See http://es5.github.io/#x11.1.5.
... | Create a new `lodash` function using the given context object.
@static
@memberOf _
@category Utilities
@param {Object} [context=root] The context object.
@returns {Function} Returns the `lodash` function. | runInContext | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function lodashWrapper(value, chainAll) {
this.__chain__ = !!chainAll;
this.__wrapped__ = value;
} | A fast path for creating `lodash` wrapper objects.
@private
@param {*} value The value to wrap in a `lodash` instance.
@param {boolean} chainAll A flag to enable chaining for all methods
@returns {Object} Returns a `lodash` instance. | lodashWrapper | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
iteratorTemplate = function(obj) {
var __p = 'var index, iterable = ' +
(obj.firstArg) +
', result = ' +
(obj.init) +
';\nif (!iterable) return result;\n' +
(obj.top) +
';';
if (obj.array) {
__p += '\nvar length = iterable.length; index = -1;\nif (' +
(obj.a... | The template used to create iterator functions.
@private
@param {Object} data The data object used to populate the text.
@returns {string} Returns the interpolated text. | iteratorTemplate | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseBind(bindData) {
var func = bindData[0],
partialArgs = bindData[2],
thisArg = bindData[4];
function bound() {
// `Function#bind` spec
// http://es5.github.io/#x15.3.4.5
if (partialArgs) {
// avoid `arguments` object deoptimizations by using... | The base implementation of `_.bind` that creates the bound function and
sets its meta data.
@private
@param {Array} bindData The bind data array.
@returns {Function} Returns the new bound function. | baseBind | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function bound() {
// `Function#bind` spec
// http://es5.github.io/#x15.3.4.5
if (partialArgs) {
// avoid `arguments` object deoptimizations by using `slice` instead
// of `Array.prototype.slice.call` and not assigning `arguments` to a
// variable as a ternary expre... | The base implementation of `_.bind` that creates the bound function and
sets its meta data.
@private
@param {Array} bindData The bind data array.
@returns {Function} Returns the new bound function. | bound | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseClone(value, isDeep, callback, stackA, stackB) {
if (callback) {
var result = callback(value);
if (typeof result != 'undefined') {
return result;
}
}
// inspect [[Class]]
var isObj = isObject(value);
if (isObj) {
var className = toStri... | The base implementation of `_.clone` without argument juggling or support
for `thisArg` binding.
@private
@param {*} value The value to clone.
@param {boolean} [isDeep=false] Specify a deep clone.
@param {Function} [callback] The function to customize cloning values.
@param {Array} [stackA=[]] Tracks traversed source ... | baseClone | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseCreate(prototype, properties) {
return isObject(prototype) ? nativeCreate(prototype) : {};
} | The base implementation of `_.create` without support for assigning
properties to the created object.
@private
@param {Object} prototype The object to inherit from.
@returns {Object} Returns the new object. | baseCreate | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseCreateCallback(func, thisArg, argCount) {
if (typeof func != 'function') {
return identity;
}
// exit early for no `thisArg` or already bound by `Function#bind`
if (typeof thisArg == 'undefined' || !('prototype' in func)) {
return func;
}
var bindData = f... | The base implementation of `_.createCallback` without support for creating
"_.pluck" or "_.where" style callbacks.
@private
@param {*} [func=identity] The value to convert to a callback.
@param {*} [thisArg] The `this` binding of the created callback.
@param {number} [argCount] The number of arguments the callback acc... | baseCreateCallback | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseCreateWrapper(bindData) {
var func = bindData[0],
bitmask = bindData[1],
partialArgs = bindData[2],
partialRightArgs = bindData[3],
thisArg = bindData[4],
arity = bindData[5];
var isBind = bitmask & 1,
isBindKey = bitmask & 2,
... | The base implementation of `createWrapper` that creates the wrapper and
sets its meta data.
@private
@param {Array} bindData The bind data array.
@returns {Function} Returns the new function. | baseCreateWrapper | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function bound() {
var thisBinding = isBind ? thisArg : this;
if (partialArgs) {
var args = slice(partialArgs);
push.apply(args, arguments);
}
if (partialRightArgs || isCurry) {
args || (args = slice(arguments));
if (partialRightArgs) {
... | The base implementation of `createWrapper` that creates the wrapper and
sets its meta data.
@private
@param {Array} bindData The bind data array.
@returns {Function} Returns the new function. | bound | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseDifference(array, values) {
var index = -1,
indexOf = getIndexOf(),
length = array ? array.length : 0,
isLarge = length >= largeArraySize && indexOf === baseIndexOf,
result = [];
if (isLarge) {
var cache = createCache(values);
if (cache) ... | The base implementation of `_.difference` that accepts a single array
of values to exclude.
@private
@param {Array} array The array to process.
@param {Array} [values] The array of values to exclude.
@returns {Array} Returns a new array of filtered values. | baseDifference | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseFlatten(array, isShallow, isStrict, fromIndex) {
var index = (fromIndex || 0) - 1,
length = array ? array.length : 0,
result = [];
while (++index < length) {
var value = array[index];
if (value && typeof value == 'object' && typeof value.length == 'number'
... | The base implementation of `_.flatten` without support for callback
shorthands or `thisArg` binding.
@private
@param {Array} array The array to flatten.
@param {boolean} [isShallow=false] A flag to restrict flattening to a single level.
@param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arg... | baseFlatten | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
// used to indicate that when comparing objects, `a` has at least the properties of `b`
if (callback) {
var result = callback(a, b);
if (typeof result != 'undefined') {
return !!result;
}
}
// exit ... | The base implementation of `_.isEqual`, without support for `thisArg` binding,
that allows partial "_.where" style comparisons.
@private
@param {*} a The value to compare.
@param {*} b The other value to compare.
@param {Function} [callback] The function to customize comparing values.
@param {Function} [isWhere=false]... | baseIsEqual | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseMerge(object, source, callback, stackA, stackB) {
(isArray(source) ? forEach : forOwn)(source, function(source, key) {
var found,
isArr,
result = source,
value = object[key];
if (source && ((isArr = isArray(source)) || isPlainObject(source))) {
... | The base implementation of `_.merge` without argument juggling or support
for `thisArg` binding.
@private
@param {Object} object The destination object.
@param {Object} source The source object.
@param {Function} [callback] The function to customize merging properties.
@param {Array} [stackA=[]] Tracks traversed sourc... | baseMerge | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseRandom(min, max) {
return min + floor(nativeRandom() * (max - min + 1));
} | The base implementation of `_.random` without argument juggling or support
for returning floating-point numbers.
@private
@param {number} min The minimum possible value.
@param {number} max The maximum possible value.
@returns {number} Returns a random number. | baseRandom | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function baseUniq(array, isSorted, callback) {
var index = -1,
indexOf = getIndexOf(),
length = array ? array.length : 0,
result = [];
var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf,
seen = (callback || isLarge) ? getArray() : result;
... | The base implementation of `_.uniq` without support for callback shorthands
or `thisArg` binding.
@private
@param {Array} array The array to process.
@param {boolean} [isSorted=false] A flag to indicate that `array` is sorted.
@param {Function} [callback] The function called per iteration.
@returns {Array} Returns a d... | baseUniq | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function createAggregator(setter) {
return function(collection, callback, thisArg) {
var result = {};
callback = lodash.createCallback(callback, thisArg, 3);
if (isArray(collection)) {
var index = -1,
length = collection.length;
while (++index < length) ... | Creates a function that aggregates a collection, creating an object composed
of keys generated from the results of running each element of the collection
through a callback. The given `setter` function sets the keys and values
of the composed object.
@private
@param {Function} setter The setter function.
@returns {Fun... | createAggregator | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
var isBind = bitmask & 1,
isBindKey = bitmask & 2,
isCurry = bitmask & 4,
isCurryBound = bitmask & 8,
isPartial = bitmask & 16,
isPartialRight = bitmask & 32;
if (!isBind... | Creates a function that, when called, either curries or invokes `func`
with an optional `this` binding and partially applied arguments.
@private
@param {Function|string} func The function or method name to reference.
@param {number} bitmask The bitmask of method flags to compose.
The bitmask may be composed of the fo... | createWrapper | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function createIterator() {
// data properties
iteratorData.shadowedProps = shadowedProps;
// iterator options
iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = '';
iteratorData.init = 'iterable';
iteratorData.useHas = true;
// merge options in... | Creates compiled iteration functions.
@private
@param {...Object} [options] The compile options object(s).
@param {string} [options.array] Code to determine if the iterable is an array or array-like.
@param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop.
@param {Function} [options.... | createIterator | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function escapeHtmlChar(match) {
return htmlEscapes[match];
} | Used by `escape` to convert characters to HTML entities.
@private
@param {string} match The matched character to escape.
@returns {string} Returns the escaped character. | escapeHtmlChar | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function getIndexOf() {
var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result;
return result;
} | Gets the appropriate "indexOf" function. If the `_.indexOf` method is
customized, this method returns the custom method, otherwise it returns
the `baseIndexOf` function.
@private
@returns {Function} Returns the "indexOf" function. | getIndexOf | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isNative(value) {
return typeof value == 'function' && reNative.test(value);
} | Checks if `value` is a native function.
@private
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a native function, else `false`. | isNative | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function shimIsPlainObject(value) {
var ctor,
result;
// avoid non Object objects, `arguments` objects, and DOM elements
if (!(value && toString.call(value) == objectClass) ||
(ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) ||
(!support.argsClass ... | A fallback implementation of `isPlainObject` which checks if a given value
is an object created by the `Object` constructor, assuming objects created
by the `Object` constructor have no inherited enumerable properties and that
there are no `Object.prototype` extensions.
@private
@param {*} value The value to check.
@r... | shimIsPlainObject | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function unescapeHtmlChar(match) {
return htmlUnescapes[match];
} | Used by `unescape` to convert HTML entities to characters.
@private
@param {string} match The matched character to unescape.
@returns {string} Returns the unescaped character. | unescapeHtmlChar | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isArguments(value) {
return value && typeof value == 'object' && typeof value.length == 'number' &&
toString.call(value) == argsClass || false;
} | Checks if `value` is an `arguments` object.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`.
@example
(function() { return _.isArguments(arguments); })(1, 2, 3);
// => true
_.isArguments([1, 2, 3]);
// ... | isArguments | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function clone(value, isDeep, callback, thisArg) {
// allows working with "Collections" methods without using their `index`
// and `collection` arguments for `isDeep` and `callback`
if (typeof isDeep != 'boolean' && isDeep != null) {
thisArg = callback;
callback = isDeep;
isDee... | Creates a clone of `value`. If `isDeep` is `true` nested objects will also
be cloned, otherwise they will be assigned by reference. If a callback
is provided it will be executed to produce the cloned values. If the
callback returns `undefined` cloning will be handled by the method instead.
The callback is bound to `thi... | clone | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function cloneDeep(value, callback, thisArg) {
return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
} | Creates a deep clone of `value`. If a callback is provided it will be
executed to produce the cloned values. If the callback returns `undefined`
cloning will be handled by the method instead. The callback is bound to
`thisArg` and invoked with one argument; (value).
Note: This method is loosely based on the structured... | cloneDeep | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function create(prototype, properties) {
var result = baseCreate(prototype);
return properties ? assign(result, properties) : result;
} | Creates an object that inherits from the given `prototype` object. If a
`properties` object is provided its own enumerable properties are assigned
to the created object.
@static
@memberOf _
@category Objects
@param {Object} prototype The object to inherit from.
@param {Object} [properties] The properties to assign to ... | create | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function findKey(object, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
forOwn(object, function(value, key, object) {
if (callback(value, key, object)) {
result = key;
return false;
}
});
return result;
} | This method is like `_.findIndex` except that it returns the key of the
first element that passes the callback check, instead of the element itself.
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property value of the given element.
If an object is provided for `cal... | findKey | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function findLastKey(object, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
forOwnRight(object, function(value, key, object) {
if (callback(value, key, object)) {
result = key;
return false;
}
});
return result;
... | This method is like `_.findKey` except that it iterates over elements
of a `collection` in the opposite order.
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property value of the given element.
If an object is provided for `callback` the created "_.where" style cal... | findLastKey | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function forInRight(object, callback, thisArg) {
var pairs = [];
forIn(object, function(value, key) {
pairs.push(key, value);
});
var length = pairs.length;
callback = baseCreateCallback(callback, thisArg, 3);
while (length--) {
if (callback(pairs[length--], pairs[l... | This method is like `_.forIn` except that it iterates over elements
of a `collection` in the opposite order.
@static
@memberOf _
@category Objects
@param {Object} object The object to iterate over.
@param {Function} [callback=identity] The function called per iteration.
@param {*} [thisArg] The `this` binding of `call... | forInRight | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function forOwnRight(object, callback, thisArg) {
var props = keys(object),
length = props.length;
callback = baseCreateCallback(callback, thisArg, 3);
while (length--) {
var key = props[length];
if (callback(object[key], key, object) === false) {
break;
}
... | This method is like `_.forOwn` except that it iterates over elements
of a `collection` in the opposite order.
@static
@memberOf _
@category Objects
@param {Object} object The object to iterate over.
@param {Function} [callback=identity] The function called per iteration.
@param {*} [thisArg] The `this` binding of `cal... | forOwnRight | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function functions(object) {
var result = [];
forIn(object, function(value, key) {
if (isFunction(value)) {
result.push(key);
}
});
return result.sort();
} | Creates a sorted array of property names of all enumerable properties,
own and inherited, of `object` that have function values.
@static
@memberOf _
@alias methods
@category Objects
@param {Object} object The object to inspect.
@returns {Array} Returns an array of property names that have function values.
@example
_.... | functions | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function has(object, key) {
return object ? hasOwnProperty.call(object, key) : false;
} | Checks if the specified property name exists as a direct property of `object`,
instead of an inherited property.
@static
@memberOf _
@category Objects
@param {Object} object The object to inspect.
@param {string} key The name of the property to check.
@returns {boolean} Returns `true` if key is a direct property, else... | has | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function invert(object) {
var index = -1,
props = keys(object),
length = props.length,
result = {};
while (++index < length) {
var key = props[index];
result[object[key]] = key;
}
return result;
} | Creates an object composed of the inverted keys and values of the given object.
@static
@memberOf _
@category Objects
@param {Object} object The object to invert.
@returns {Object} Returns the created inverted object.
@example
_.invert({ 'first': 'fred', 'second': 'barney' });
// => { 'fred': 'first', 'barney': 'seco... | invert | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isBoolean(value) {
return value === true || value === false ||
value && typeof value == 'object' && toString.call(value) == boolClass || false;
} | Checks if `value` is a boolean value.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a boolean value, else `false`.
@example
_.isBoolean(null);
// => false | isBoolean | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isDate(value) {
return value && typeof value == 'object' && toString.call(value) == dateClass || false;
} | Checks if `value` is a date.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a date, else `false`.
@example
_.isDate(new Date);
// => true | isDate | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isElement(value) {
return value && value.nodeType === 1 || false;
} | Checks if `value` is a DOM element.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a DOM element, else `false`.
@example
_.isElement(document.body);
// => true | isElement | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isEmpty(value) {
var result = true;
if (!value) {
return result;
}
var className = toString.call(value),
length = value.length;
if ((className == arrayClass || className == stringClass ||
(support.argsClass ? className == argsClass : isArguments(value)... | Checks if `value` is empty. Arrays, strings, or `arguments` objects with a
length of `0` and objects with no own enumerable properties are considered
"empty".
@static
@memberOf _
@category Objects
@param {Array|Object|string} value The value to inspect.
@returns {boolean} Returns `true` if the `value` is empty, else `... | isEmpty | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isEqual(a, b, callback, thisArg) {
return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2));
} | Performs a deep comparison between two values to determine if they are
equivalent to each other. If a callback is provided it will be executed
to compare values. If the callback returns `undefined` comparisons will
be handled by the method instead. The callback is bound to `thisArg` and
invoked with two arguments; (a, ... | isEqual | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isFinite(value) {
return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value));
} | Checks if `value` is, or can be coerced to, a finite number.
Note: This is not the same as native `isFinite` which will return true for
booleans and empty strings. See http://es5.github.io/#x15.1.2.5.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `... | isFinite | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isFunction(value) {
return typeof value == 'function';
} | Checks if `value` is a function.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a function, else `false`.
@example
_.isFunction(_);
// => true | isFunction | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isObject(value) {
// check if the value is the ECMAScript language type of Object
// http://es5.github.io/#x8
// and avoid a V8 bug
// http://code.google.com/p/v8/issues/detail?id=2291
return !!(value && objectTypes[typeof value]);
} | Checks if `value` is the language type of Object.
(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is an object, else `false`.
@example
_.isObject({});
// => tru... | isObject | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isNaN(value) {
// `NaN` as a primitive is the only value that is not equal to itself
// (perform the [[Class]] check first to avoid errors with some host objects in IE)
return isNumber(value) && value != +value;
} | Checks if `value` is `NaN`.
Note: This is not the same as native `isNaN` which will return `true` for
`undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is `NaN`, els... | isNaN | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isNull(value) {
return value === null;
} | Checks if `value` is `null`.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is `null`, else `false`.
@example
_.isNull(null);
// => true
_.isNull(undefined);
// => false | isNull | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isNumber(value) {
return typeof value == 'number' ||
value && typeof value == 'object' && toString.call(value) == numberClass || false;
} | Checks if `value` is a number.
Note: `NaN` is considered a number. See http://es5.github.io/#x8.5.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a number, else `false`.
@example
_.isNumber(8.4 * 5);
// => true | isNumber | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isRegExp(value) {
return value && objectTypes[typeof value] && toString.call(value) == regexpClass || false;
} | Checks if `value` is a regular expression.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a regular expression, else `false`.
@example
_.isRegExp(/fred/);
// => true | isRegExp | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isString(value) {
return typeof value == 'string' ||
value && typeof value == 'object' && toString.call(value) == stringClass || false;
} | Checks if `value` is a string.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is a string, else `false`.
@example
_.isString('fred');
// => true | isString | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function isUndefined(value) {
return typeof value == 'undefined';
} | Checks if `value` is `undefined`.
@static
@memberOf _
@category Objects
@param {*} value The value to check.
@returns {boolean} Returns `true` if the `value` is `undefined`, else `false`.
@example
_.isUndefined(void 0);
// => true | isUndefined | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function mapValues(object, callback, thisArg) {
var result = {};
callback = lodash.createCallback(callback, thisArg, 3);
forOwn(object, function(value, key, object) {
result[key] = callback(value, key, object);
});
return result;
} | Creates an object with the same keys as `object` and values generated by
running each own enumerable property of `object` through the callback.
The callback is bound to `thisArg` and invoked with three arguments;
(value, key, object).
If a property name is provided for `callback` the created "_.pluck" style
callback w... | mapValues | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function merge(object) {
var args = arguments,
length = 2;
if (!isObject(object)) {
return object;
}
// allows working with `_.reduce` and `_.reduceRight` without using
// their `index` and `collection` arguments
if (typeof args[2] != 'number') {
length = a... | Recursively merges own enumerable properties of the source object(s), that
don't resolve to `undefined` into the destination object. Subsequent sources
will overwrite property assignments of previous sources. If a callback is
provided it will be executed to produce the merged values of the destination
and source proper... | merge | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function pairs(object) {
var index = -1,
props = keys(object),
length = props.length,
result = Array(length);
while (++index < length) {
var key = props[index];
result[index] = [key, object[key]];
}
return result;
} | Creates a two dimensional array of an object's key-value pairs,
i.e. `[[key1, value1], [key2, value2]]`.
@static
@memberOf _
@category Objects
@param {Object} object The object to inspect.
@returns {Array} Returns new array of key-value pairs.
@example
_.pairs({ 'barney': 36, 'fred': 40 });
// => [['barney', 36], ['f... | pairs | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function pick(object, callback, thisArg) {
var result = {};
if (typeof callback != 'function') {
var index = -1,
props = baseFlatten(arguments, true, false, 1),
length = isObject(object) ? props.length : 0;
while (++index < length) {
var key = props[index];... | Creates a shallow clone of `object` composed of the specified properties.
Property names may be specified as individual arguments or as arrays of
property names. If a callback is provided it will be executed for each
property of `object` picking the properties the callback returns truey
for. The callback is bound to `t... | pick | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function transform(object, callback, accumulator, thisArg) {
var isArr = isArray(object);
if (accumulator == null) {
if (isArr) {
accumulator = [];
} else {
var ctor = object && object.constructor,
proto = ctor && ctor.prototype;
accumulator = bas... | An alternative to `_.reduce` this method transforms `object` to a new
`accumulator` object which is the result of running each of its own
enumerable properties through a callback, with each callback execution
potentially mutating the `accumulator` object. The callback is bound to
`thisArg` and invoked with four argumen... | transform | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function values(object) {
var index = -1,
props = keys(object),
length = props.length,
result = Array(length);
while (++index < length) {
result[index] = object[props[index]];
}
return result;
} | Creates an array composed of the own enumerable property values of `object`.
@static
@memberOf _
@category Objects
@param {Object} object The object to inspect.
@returns {Array} Returns an array of property values.
@example
_.values({ 'one': 1, 'two': 2, 'three': 3 });
// => [1, 2, 3] (property order is not guarantee... | values | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function at(collection) {
var args = arguments,
index = -1,
props = baseFlatten(args, true, false, 1),
length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length,
result = Array(length);
if (support.unindexedChars && isString(collection)) {
coll... | Creates an array of elements from the specified indexes, or keys, of the
`collection`. Indexes may be specified as individual arguments or as arrays
of indexes.
@static
@memberOf _
@category Collections
@param {Array|Object|string} collection The collection to iterate over.
@param {...(number|number[]|string|string[])... | at | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function contains(collection, target, fromIndex) {
var index = -1,
indexOf = getIndexOf(),
length = collection ? collection.length : 0,
result = false;
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0;
if (isArray(collection)) {
res... | Checks if a given value is present in a collection using strict equality
for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the
offset from the end of the collection.
@static
@memberOf _
@alias include
@category Collections
@param {Array|Object|string} collection The collection to iterate over.
@pa... | contains | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function every(collection, callback, thisArg) {
var result = true;
callback = lodash.createCallback(callback, thisArg, 3);
if (isArray(collection)) {
var index = -1,
length = collection.length;
while (++index < length) {
if (!(result = !!callback(collection[inde... | Checks if the given callback returns truey value for **all** elements of
a collection. The callback is bound to `thisArg` and invoked with three
arguments; (value, index|key, collection).
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property value of the given elem... | every | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function filter(collection, callback, thisArg) {
var result = [];
callback = lodash.createCallback(callback, thisArg, 3);
if (isArray(collection)) {
var index = -1,
length = collection.length;
while (++index < length) {
var value = collection[index];
i... | Iterates over elements of a collection, returning an array of all elements
the callback returns truey for. The callback is bound to `thisArg` and
invoked with three arguments; (value, index|key, collection).
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property val... | filter | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function find(collection, callback, thisArg) {
callback = lodash.createCallback(callback, thisArg, 3);
if (isArray(collection)) {
var index = -1,
length = collection.length;
while (++index < length) {
var value = collection[index];
if (callback(value, index,... | Iterates over elements of a collection, returning the first element that
the callback returns truey for. The callback is bound to `thisArg` and
invoked with three arguments; (value, index|key, collection).
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property value... | find | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function findLast(collection, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
forEachRight(collection, function(value, index, collection) {
if (callback(value, index, collection)) {
result = value;
return false;
}
});
... | This method is like `_.find` except that it iterates over elements
of a `collection` from right to left.
@static
@memberOf _
@category Collections
@param {Array|Object|string} collection The collection to iterate over.
@param {Function|Object|string} [callback=identity] The function called
per iteration. If a propert... | findLast | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function forEach(collection, callback, thisArg) {
if (callback && typeof thisArg == 'undefined' && isArray(collection)) {
var index = -1,
length = collection.length;
while (++index < length) {
if (callback(collection[index], index, collection) === false) {
break;... | Iterates over elements of a collection, executing the callback for each
element. The callback is bound to `thisArg` and invoked with three arguments;
(value, index|key, collection). Callbacks may exit iteration early by
explicitly returning `false`.
Note: As with other "Collections" methods, objects with a `length` pr... | forEach | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function forEachRight(collection, callback, thisArg) {
var iterable = collection,
length = collection ? collection.length : 0;
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
if (isArray(collection)) {
while (length--) {
... | This method is like `_.forEach` except that it iterates over elements
of a `collection` from right to left.
@static
@memberOf _
@alias eachRight
@category Collections
@param {Array|Object|string} collection The collection to iterate over.
@param {Function} [callback=identity] The function called per iteration.
@param ... | forEachRight | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function invoke(collection, methodName) {
var args = slice(arguments, 2),
index = -1,
isFunc = typeof methodName == 'function',
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value) {
... | Invokes the method named by `methodName` on each element in the `collection`
returning an array of the results of each invoked method. Additional arguments
will be provided to each invoked method. If `methodName` is a function it
will be invoked for, and `this` bound to, each element in the `collection`.
@static
@memb... | invoke | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function map(collection, callback, thisArg) {
var index = -1,
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
callback = lodash.createCallback(callback, thisArg, 3);
if (isArray(collection)) {
while (++index < length) {
... | Creates an array of values by running each element in the collection
through the callback. The callback is bound to `thisArg` and invoked with
three arguments; (value, index|key, collection).
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property value of the given ... | map | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function max(collection, callback, thisArg) {
var computed = -Infinity,
result = computed;
// allows working with functions like `_.map` without using
// their `index` argument as a callback
if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) {
ca... | Retrieves the maximum value of a collection. If the collection is empty or
falsey `-Infinity` is returned. If a callback is provided it will be executed
for each value in the collection to generate the criterion by which the value
is ranked. The callback is bound to `thisArg` and invoked with three
arguments; (value, i... | max | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function min(collection, callback, thisArg) {
var computed = Infinity,
result = computed;
// allows working with functions like `_.map` without using
// their `index` argument as a callback
if (typeof callback != 'function' && thisArg && thisArg[callback] === collection) {
cal... | Retrieves the minimum value of a collection. If the collection is empty or
falsey `Infinity` is returned. If a callback is provided it will be executed
for each value in the collection to generate the criterion by which the value
is ranked. The callback is bound to `thisArg` and invoked with three
arguments; (value, in... | min | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function reduce(collection, callback, accumulator, thisArg) {
var noaccum = arguments.length < 3;
callback = lodash.createCallback(callback, thisArg, 4);
if (isArray(collection)) {
var index = -1,
length = collection.length;
if (noaccum) {
accumulator = collecti... | Reduces a collection to a value which is the accumulated result of running
each element in the collection through the callback, where each successive
callback execution consumes the return value of the previous execution. If
`accumulator` is not provided the first element of the collection will be
used as the initial `... | reduce | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function reduceRight(collection, callback, accumulator, thisArg) {
var noaccum = arguments.length < 3;
callback = lodash.createCallback(callback, thisArg, 4);
forEachRight(collection, function(value, index, collection) {
accumulator = noaccum
? (noaccum = false, value)
: ca... | This method is like `_.reduce` except that it iterates over elements
of a `collection` from right to left.
@static
@memberOf _
@alias foldr
@category Collections
@param {Array|Object|string} collection The collection to iterate over.
@param {Function} [callback=identity] The function called per iteration.
@param {*} [... | reduceRight | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function reject(collection, callback, thisArg) {
callback = lodash.createCallback(callback, thisArg, 3);
return filter(collection, function(value, index, collection) {
return !callback(value, index, collection);
});
} | The opposite of `_.filter` this method returns the elements of a
collection that the callback does **not** return truey for.
If a property name is provided for `callback` the created "_.pluck" style
callback will return the property value of the given element.
If an object is provided for `callback` the created "_.wh... | reject | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function sample(collection, n, guard) {
if (collection && typeof collection.length != 'number') {
collection = values(collection);
} else if (support.unindexedChars && isString(collection)) {
collection = collection.split('');
}
if (n == null || guard) {
return collection... | Retrieves a random element or `n` random elements from a collection.
@static
@memberOf _
@category Collections
@param {Array|Object|string} collection The collection to sample.
@param {number} [n] The number of elements to sample.
@param- {Object} [guard] Allows working with functions like `_.map`
without using their... | sample | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
function shuffle(collection) {
var index = -1,
length = collection ? collection.length : 0,
result = Array(typeof length == 'number' ? length : 0);
forEach(collection, function(value) {
var rand = baseRandom(0, ++index);
result[index] = result[rand];
result[rand]... | Creates an array of shuffled values, using a version of the Fisher-Yates
shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@static
@memberOf _
@category Collections
@param {Array|Object|string} collection The collection to shuffle.
@returns {Array} Returns a new shuffled collection.
@example
_.shuffle([... | shuffle | javascript | sdelements/lets-chat | media/js/vendor/lodash/lodash.compat.js | https://github.com/sdelements/lets-chat/blob/master/media/js/vendor/lodash/lodash.compat.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.