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 |
---|---|---|---|---|---|---|---|
next = function() {
jQuery.dequeue( elem, type );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
next
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
resolve = function() {
if ( !( --count ) ) {
defer.resolveWith( elements, [ elements ] );
}
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
resolve
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
isAttached = function( elem ) {
return jQuery.contains( elem.ownerDocument, elem );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
isAttached
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
isHiddenWithinTree = function( elem, el ) {
// isHiddenWithinTree might be called from jQuery#filter function;
// in that case, element will be second argument
elem = el || elem;
// Inline style trumps all
return elem.style.display === "none" ||
elem.style.display === "" &&
// Otherwise, check computed style
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
isAttached( elem ) &&
jQuery.css( elem, "display" ) === "none";
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
isHiddenWithinTree
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
ret = callback.apply( elem, args || [] );
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
return ret;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
swap
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
return tween.cur();
} :
function() {
return jQuery.css( elem, prop, "" );
},
initial = currentValue(),
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
// Starting value computation is required for potential unit mismatches
initialInUnit = elem.nodeType &&
( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
rcssNum.exec( jQuery.css( elem, prop ) );
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
// Support: Firefox <=54
// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
initial = initial / 2;
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
// Iteratively approximate from a nonzero starting point
initialInUnit = +initial || 1;
while ( maxIterations-- ) {
// Evaluate and update our best guess (doubling guesses that zero out).
// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
jQuery.style( elem, prop, initialInUnit + unit );
if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
maxIterations = 0;
}
initialInUnit = initialInUnit / scale;
}
initialInUnit = initialInUnit * 2;
jQuery.style( elem, prop, initialInUnit + unit );
// Make sure we update the tween properties later on
valueParts = valueParts || [];
}
if ( valueParts ) {
initialInUnit = +initialInUnit || +initial || 0;
// Apply relative offset (+=/-=) if specified
adjusted = valueParts[ 1 ] ?
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+valueParts[ 2 ];
if ( tween ) {
tween.unit = unit;
tween.start = initialInUnit;
tween.end = adjusted;
}
}
return adjusted;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
adjustCSS
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function getDefaultDisplay( elem ) {
var temp,
doc = elem.ownerDocument,
nodeName = elem.nodeName,
display = defaultDisplayMap[ nodeName ];
if ( display ) {
return display;
}
temp = doc.body.appendChild( doc.createElement( nodeName ) );
display = jQuery.css( temp, "display" );
temp.parentNode.removeChild( temp );
if ( display === "none" ) {
display = "block";
}
defaultDisplayMap[ nodeName ] = display;
return display;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
getDefaultDisplay
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function showHide( elements, show ) {
var display, elem,
values = [],
index = 0,
length = elements.length;
// Determine new display value for elements that need to change
for ( ; index < length; index++ ) {
elem = elements[ index ];
if ( !elem.style ) {
continue;
}
display = elem.style.display;
if ( show ) {
// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
// check is required in this first loop unless we have a nonempty display value (either
// inline or about-to-be-restored)
if ( display === "none" ) {
values[ index ] = dataPriv.get( elem, "display" ) || null;
if ( !values[ index ] ) {
elem.style.display = "";
}
}
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
values[ index ] = getDefaultDisplay( elem );
}
} else {
if ( display !== "none" ) {
values[ index ] = "none";
// Remember what we're overwriting
dataPriv.set( elem, "display", display );
}
}
}
// Set the display of the elements in a second loop to avoid constant reflow
for ( index = 0; index < length; index++ ) {
if ( values[ index ] != null ) {
elements[ index ].style.display = values[ index ];
}
}
return elements;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
showHide
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function getAll( context, tag ) {
// Support: IE <=9 - 11 only
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
var ret;
if ( typeof context.getElementsByTagName !== "undefined" ) {
ret = context.getElementsByTagName( tag || "*" );
} else if ( typeof context.querySelectorAll !== "undefined" ) {
ret = context.querySelectorAll( tag || "*" );
} else {
ret = [];
}
if ( tag === undefined || tag && nodeName( context, tag ) ) {
return jQuery.merge( [ context ], ret );
}
return ret;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
getAll
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function setGlobalEval( elems, refElements ) {
var i = 0,
l = elems.length;
for ( ; i < l; i++ ) {
dataPriv.set(
elems[ i ],
"globalEval",
!refElements || dataPriv.get( refElements[ i ], "globalEval" )
);
}
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
setGlobalEval
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function buildFragment( elems, context, scripts, selection, ignored ) {
var elem, tmp, tag, wrap, attached, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
l = elems.length;
for ( ; i < l; i++ ) {
elem = elems[ i ];
if ( elem || elem === 0 ) {
// Add nodes directly
if ( toType( elem ) === "object" ) {
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
// Convert non-html into a text node
} else if ( !rhtml.test( elem ) ) {
nodes.push( context.createTextNode( elem ) );
// Convert html into DOM nodes
} else {
tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
// Deserialize a standard representation
tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
wrap = wrapMap[ tag ] || wrapMap._default;
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
// Descend through wrappers to the right content
j = wrap[ 0 ];
while ( j-- ) {
tmp = tmp.lastChild;
}
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, tmp.childNodes );
// Remember the top-level container
tmp = fragment.firstChild;
// Ensure the created nodes are orphaned (#12392)
tmp.textContent = "";
}
}
}
// Remove wrapper from fragment
fragment.textContent = "";
i = 0;
while ( ( elem = nodes[ i++ ] ) ) {
// Skip elements already in the context collection (trac-4087)
if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
if ( ignored ) {
ignored.push( elem );
}
continue;
}
attached = isAttached( elem );
// Append to fragment
tmp = getAll( fragment.appendChild( elem ), "script" );
// Preserve script evaluation history
if ( attached ) {
setGlobalEval( tmp );
}
// Capture executables
if ( scripts ) {
j = 0;
while ( ( elem = tmp[ j++ ] ) ) {
if ( rscriptType.test( elem.type || "" ) ) {
scripts.push( elem );
}
}
}
}
return fragment;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
buildFragment
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function returnTrue() {
return true;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
returnTrue
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function returnFalse() {
return false;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
returnFalse
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function expectSync( elem, type ) {
return ( elem === safeActiveElement() ) === ( type === "focus" );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
expectSync
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function safeActiveElement() {
try {
return document.activeElement;
} catch ( err ) { }
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
safeActiveElement
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
// ( types-Object, selector, data )
if ( typeof selector !== "string" ) {
// ( types-Object, data )
data = data || selector;
selector = undefined;
}
for ( type in types ) {
on( elem, type, selector, data, types[ type ], one );
}
return elem;
}
if ( data == null && fn == null ) {
// ( types, fn )
fn = selector;
data = selector = undefined;
} else if ( fn == null ) {
if ( typeof selector === "string" ) {
// ( types, selector, fn )
fn = data;
data = undefined;
} else {
// ( types, data, fn )
fn = data;
data = selector;
selector = undefined;
}
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return elem;
}
if ( one === 1 ) {
origFn = fn;
fn = function( event ) {
// Can use an empty set, since event contains the info
jQuery().off( event );
return origFn.apply( this, arguments );
};
// Use same guid so caller can remove using origFn
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
}
return elem.each( function() {
jQuery.event.add( this, types, fn, data, selector );
} );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
on
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function leverageNative( el, type, expectSync ) {
// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
if ( !expectSync ) {
if ( dataPriv.get( el, type ) === undefined ) {
jQuery.event.add( el, type, returnTrue );
}
return;
}
// Register the controller as a special universal handler for all event namespaces
dataPriv.set( el, type, false );
jQuery.event.add( el, type, {
namespace: false,
handler: function( event ) {
var notAsync, result,
saved = dataPriv.get( this, type );
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
// Interrupt processing of the outer synthetic .trigger()ed event
// Saved data should be false in such cases, but might be a leftover capture object
// from an async native handler (gh-4350)
if ( !saved.length ) {
// Store arguments for use when handling the inner native event
// There will always be at least one argument (an event object), so this array
// will not be confused with a leftover capture object.
saved = slice.call( arguments );
dataPriv.set( this, type, saved );
// Trigger the native event and capture its result
// Support: IE <=9 - 11+
// focus() and blur() are asynchronous
notAsync = expectSync( this, type );
this[ type ]();
result = dataPriv.get( this, type );
if ( saved !== result || notAsync ) {
dataPriv.set( this, type, false );
} else {
result = {};
}
if ( saved !== result ) {
// Cancel the outer synthetic event
event.stopImmediatePropagation();
event.preventDefault();
return result.value;
}
// If this is an inner synthetic event for an event with a bubbling surrogate
// (focus or blur), assume that the surrogate already propagated from triggering the
// native event and prevent that from happening again here.
// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
// bubbling surrogate propagates *after* the non-bubbling base), but that seems
// less bad than duplication.
} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
event.stopPropagation();
}
// If this is a native event triggered above, everything is now in order
// Fire an inner synthetic event with the original arguments
} else if ( saved.length ) {
// ...and capture the result
dataPriv.set( this, type, {
value: jQuery.event.trigger(
// Support: IE <=9 - 11+
// Extend with the prototype to reset the above stopImmediatePropagation()
jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
saved.slice( 1 ),
this
)
} );
// Abort handling of the native event
event.stopImmediatePropagation();
}
}
} );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
leverageNative
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function manipulationTarget( elem, content ) {
if ( nodeName( elem, "table" ) &&
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
}
return elem;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
manipulationTarget
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function disableScript( elem ) {
elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
return elem;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
disableScript
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function restoreScript( elem ) {
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
elem.type = elem.type.slice( 5 );
} else {
elem.removeAttribute( "type" );
}
return elem;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
restoreScript
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function cloneCopyEvent( src, dest ) {
var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
if ( dest.nodeType !== 1 ) {
return;
}
// 1. Copy private data: events, handlers, etc.
if ( dataPriv.hasData( src ) ) {
pdataOld = dataPriv.access( src );
pdataCur = dataPriv.set( dest, pdataOld );
events = pdataOld.events;
if ( events ) {
delete pdataCur.handle;
pdataCur.events = {};
for ( type in events ) {
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
jQuery.event.add( dest, type, events[ type ][ i ] );
}
}
}
}
// 2. Copy user data
if ( dataUser.hasData( src ) ) {
udataOld = dataUser.access( src );
udataCur = jQuery.extend( {}, udataOld );
dataUser.set( dest, udataCur );
}
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
cloneCopyEvent
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function fixInput( src, dest ) {
var nodeName = dest.nodeName.toLowerCase();
// Fails to persist the checked state of a cloned checkbox or radio button.
if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
dest.checked = src.checked;
// Fails to return the selected option to the default selected state when cloning options
} else if ( nodeName === "input" || nodeName === "textarea" ) {
dest.defaultValue = src.defaultValue;
}
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
fixInput
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function domManip( collection, args, callback, ignored ) {
// Flatten any nested arrays
args = concat.apply( [], args );
var fragment, first, scripts, hasScripts, node, doc,
i = 0,
l = collection.length,
iNoClone = l - 1,
value = args[ 0 ],
valueIsFunction = isFunction( value );
// We can't cloneNode fragments that contain checked, in WebKit
if ( valueIsFunction ||
( l > 1 && typeof value === "string" &&
!support.checkClone && rchecked.test( value ) ) ) {
return collection.each( function( index ) {
var self = collection.eq( index );
if ( valueIsFunction ) {
args[ 0 ] = value.call( this, index, self.html() );
}
domManip( self, args, callback, ignored );
} );
}
if ( l ) {
fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
first = fragment.firstChild;
if ( fragment.childNodes.length === 1 ) {
fragment = first;
}
// Require either new content or an interest in ignored elements to invoke the callback
if ( first || ignored ) {
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
hasScripts = scripts.length;
// Use the original fragment for the last item
// instead of the first because it can end up
// being emptied incorrectly in certain situations (#8070).
for ( ; i < l; i++ ) {
node = fragment;
if ( i !== iNoClone ) {
node = jQuery.clone( node, true, true );
// Keep references to cloned scripts for later restoration
if ( hasScripts ) {
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( scripts, getAll( node, "script" ) );
}
}
callback.call( collection[ i ], node, i );
}
if ( hasScripts ) {
doc = scripts[ scripts.length - 1 ].ownerDocument;
// Reenable scripts
jQuery.map( scripts, restoreScript );
// Evaluate executable scripts on first document insertion
for ( i = 0; i < hasScripts; i++ ) {
node = scripts[ i ];
if ( rscriptType.test( node.type || "" ) &&
!dataPriv.access( node, "globalEval" ) &&
jQuery.contains( doc, node ) ) {
if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
// Optional AJAX dependency, but won't run scripts if not present
if ( jQuery._evalUrl && !node.noModule ) {
jQuery._evalUrl( node.src, {
nonce: node.nonce || node.getAttribute( "nonce" )
} );
}
} else {
DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
}
}
}
}
}
}
return collection;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
domManip
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function remove( elem, selector, keepData ) {
var node,
nodes = selector ? jQuery.filter( selector, elem ) : elem,
i = 0;
for ( ; ( node = nodes[ i ] ) != null; i++ ) {
if ( !keepData && node.nodeType === 1 ) {
jQuery.cleanData( getAll( node ) );
}
if ( node.parentNode ) {
if ( keepData && isAttached( node ) ) {
setGlobalEval( getAll( node, "script" ) );
}
node.parentNode.removeChild( node );
}
}
return elem;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
remove
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
getStyles = function( elem ) {
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
if ( !view || !view.opener ) {
view = window;
}
return view.getComputedStyle( elem );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
getStyles
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function computeStyleTests() {
// This is a singleton, we need to execute it only once
if ( !div ) {
return;
}
container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
"margin-top:1px;padding:0;border:0";
div.style.cssText =
"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
"margin:auto;border:1px;padding:1px;" +
"width:60%;top:1%";
documentElement.appendChild( container ).appendChild( div );
var divStyle = window.getComputedStyle( div );
pixelPositionVal = divStyle.top !== "1%";
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
// Some styles come back with percentage values, even though they shouldn't
div.style.right = "60%";
pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
// Support: IE 9 - 11 only
// Detect misreporting of content dimensions for box-sizing:border-box elements
boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
// Support: IE 9 only
// Detect overflow:scroll screwiness (gh-3699)
// Support: Chrome <=64
// Don't get tricked when zoom affects offsetWidth (gh-4029)
div.style.position = "absolute";
scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
documentElement.removeChild( container );
// Nullify the div so it wouldn't be stored in the memory and
// it will also be a sign that checks already performed
div = null;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
computeStyleTests
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function roundPixelMeasures( measure ) {
return Math.round( parseFloat( measure ) );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
roundPixelMeasures
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function curCSS( elem, name, computed ) {
var width, minWidth, maxWidth, ret,
// Support: Firefox 51+
// Retrieving style before computed somehow
// fixes an issue with getting wrong values
// on detached elements
style = elem.style;
computed = computed || getStyles( elem );
// getPropertyValue is needed for:
// .css('filter') (IE 9 only, #12537)
// .css('--customProperty) (#3144)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];
if ( ret === "" && !isAttached( elem ) ) {
ret = jQuery.style( elem, name );
}
// A tribute to the "awesome hack by Dean Edwards"
// Android Browser returns percentage for some values,
// but width seems to be reliably pixels.
// This is against the CSSOM draft spec:
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
// Remember the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
// Put in the new values to get a computed value out
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
// Revert the changed values
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== undefined ?
// Support: IE <=9 - 11 only
// IE returns zIndex value as an integer.
ret + "" :
ret;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
curCSS
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function addGetHookIf( conditionFn, hookFn ) {
// Define the hook, we'll check on the first run if it's really needed.
return {
get: function() {
if ( conditionFn() ) {
// Hook not needed (or it's not possible to use it due
// to missing dependency), remove it.
delete this.get;
return;
}
// Hook needed; redefine it so that the support test is not executed again.
return ( this.get = hookFn ).apply( this, arguments );
}
};
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
addGetHookIf
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function vendorPropName( name ) {
// Check for vendor prefixed names
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
i = cssPrefixes.length;
while ( i-- ) {
name = cssPrefixes[ i ] + capName;
if ( name in emptyStyle ) {
return name;
}
}
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
vendorPropName
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function finalPropName( name ) {
var final = jQuery.cssProps[ name ] || vendorProps[ name ];
if ( final ) {
return final;
}
if ( name in emptyStyle ) {
return name;
}
return vendorProps[ name ] = vendorPropName( name ) || name;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
finalPropName
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function setPositiveNumber( elem, value, subtract ) {
// Any relative (+/-) values have already been
// normalized at this point
var matches = rcssNum.exec( value );
return matches ?
// Guard against undefined "subtract", e.g., when used as in cssHooks
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
value;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
setPositiveNumber
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
var i = dimension === "width" ? 1 : 0,
extra = 0,
delta = 0;
// Adjustment may not be necessary
if ( box === ( isBorderBox ? "border" : "content" ) ) {
return 0;
}
for ( ; i < 4; i += 2 ) {
// Both box models exclude margin
if ( box === "margin" ) {
delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
}
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
if ( !isBorderBox ) {
// Add padding
delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
// For "border" or "margin", add border
if ( box !== "padding" ) {
delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
// But still keep track of it otherwise
} else {
extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
}
// If we get here with a border-box (content + padding + border), we're seeking "content" or
// "padding" or "margin"
} else {
// For "content", subtract padding
if ( box === "content" ) {
delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
}
// For "content" or "padding", subtract border
if ( box !== "margin" ) {
delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
}
}
}
// Account for positive content-box scroll gutter when requested by providing computedVal
if ( !isBorderBox && computedVal >= 0 ) {
// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
// Assuming integer scroll gutter, subtract the rest and round down
delta += Math.max( 0, Math.ceil(
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
computedVal -
delta -
extra -
0.5
// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
// Use an explicit zero to avoid NaN (gh-3964)
) ) || 0;
}
return delta;
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
boxModelAdjustment
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function getWidthOrHeight( elem, dimension, extra ) {
// Start with computed style
var styles = getStyles( elem ),
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
// Fake content-box until we know it's needed to know the true value.
boxSizingNeeded = !support.boxSizingReliable() || extra,
isBorderBox = boxSizingNeeded &&
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
valueIsBorderBox = isBorderBox,
val = curCSS( elem, dimension, styles ),
offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
// Support: Firefox <=54
// Return a confounding non-pixel value or feign ignorance, as appropriate.
if ( rnumnonpx.test( val ) ) {
if ( !extra ) {
return val;
}
val = "auto";
}
// Fall back to offsetWidth/offsetHeight when value is "auto"
// This happens for inline elements with no explicit setting (gh-3571)
// Support: Android <=4.1 - 4.3 only
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
// Support: IE 9-11 only
// Also use offsetWidth/offsetHeight for when box sizing is unreliable
// We use getClientRects() to check for hidden/disconnected.
// In those cases, the computed value can be trusted to be border-box
if ( ( !support.boxSizingReliable() && isBorderBox ||
val === "auto" ||
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
elem.getClientRects().length ) {
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
// Where available, offsetWidth/offsetHeight approximate border box dimensions.
// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
// retrieved value as a content box dimension.
valueIsBorderBox = offsetProp in elem;
if ( valueIsBorderBox ) {
val = elem[ offsetProp ];
}
}
// Normalize "" and auto
val = parseFloat( val ) || 0;
// Adjust for the element's box model
return ( val +
boxModelAdjustment(
elem,
dimension,
extra || ( isBorderBox ? "border" : "content" ),
valueIsBorderBox,
styles,
// Provide the current computed size to request scroll gutter calculation (gh-3589)
val
)
) + "px";
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
getWidthOrHeight
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function stripAndCollapse( value ) {
var tokens = value.match( rnothtmlwhite ) || [];
return tokens.join( " " );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
stripAndCollapse
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function getClass( elem ) {
return elem.getAttribute && elem.getAttribute( "class" ) || "";
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
getClass
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function classesToArray( value ) {
if ( Array.isArray( value ) ) {
return value;
}
if ( typeof value === "string" ) {
return value.match( rnothtmlwhite ) || [];
}
return [];
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
classesToArray
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
handler = function( event ) {
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
handler
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function buildParams( prefix, obj, traditional, add ) {
var name;
if ( Array.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 (array or object), encode its numeric index.
buildParams(
prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
v,
traditional,
add
);
}
} );
} else if ( !traditional && toType( obj ) === "object" ) {
// Serialize object item.
for ( name in obj ) {
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
}
} else {
// Serialize scalar item.
add( prefix, obj );
}
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
buildParams
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
add = function( key, valueOrFunction ) {
// If value is a function, invoke it and use its return value
var value = isFunction( valueOrFunction ) ?
valueOrFunction() :
valueOrFunction;
s[ s.length ] = encodeURIComponent( key ) + "=" +
encodeURIComponent( value == null ? "" : value );
}
|
A low-level selection function that works with Sizzle's compiled
selector functions
@param {String|Function} selector A selector or a pre-compiled
selector function built with Sizzle.compile
@param {Element} context
@param {Array} [results]
@param {Array} [seed] A set of elements to match against
|
add
|
javascript
|
douyu/juno
|
assets/public/js/jquery/v3.4.1/jquery.slim.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/jquery/v3.4.1/jquery.slim.js
|
Apache-2.0
|
function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
}
|
The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.
@static
@memberOf _
@since 4.0.0
@category Array
@param {Array} pairs The key-value pairs.
@returns {Object} Returns the new object.
@example
_.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 }
|
fromPairs
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
|
A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
@private
@param {*} value The value to query.
@returns {string} Returns the raw `toStringTag`.
|
getRawTag
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function objectToString(value) {
return nativeObjectToString$1.call(value);
}
|
Converts `value` to a string using `Object.prototype.toString`.
@private
@param {*} value The value to convert.
@returns {string} Returns the converted string.
|
objectToString
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return symToStringTag$1 && symToStringTag$1 in Object(value) ? _getRawTag(value) : _objectToString(value);
}
|
The base implementation of `getTag` without fallbacks for buggy environments.
@private
@param {*} value The value to query.
@returns {string} Returns the `toStringTag`.
|
baseGetTag
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
|
Checks if `value` is object-like. A value is object-like if it's not `null`
and has a `typeof` result of "object".
@static
@memberOf _
@since 4.0.0
@category Lang
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is object-like, else `false`.
@example
_.isObjectLike({});
// => true
_.isObjectLike([1, 2, 3]);
// => true
_.isObjectLike(_.noop);
// => false
_.isObjectLike(null);
// => false
|
isObjectLike
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isKey(value, object) {
if (isArray_1(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol_1(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
|
Checks if `value` is a property name and not a property path.
@private
@param {*} value The value to check.
@param {Object} [object] The object to query keys on.
@returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
isKey
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
|
Checks if `value` is the
[language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
@static
@memberOf _
@since 0.1.0
@category Lang
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is an object, else `false`.
@example
_.isObject({});
// => true
_.isObject([1, 2, 3]);
// => true
_.isObject(_.noop);
// => true
_.isObject(null);
// => false
|
isObject
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isFunction(value) {
if (!isObject_1(value)) {
return false;
} // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = _baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
|
Checks if `value` is classified as a `Function` object.
@static
@memberOf _
@since 0.1.0
@category Lang
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is a function, else `false`.
@example
_.isFunction(_);
// => true
_.isFunction(/abc/);
// => false
|
isFunction
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
|
Checks if `func` has its source masked.
@private
@param {Function} func The function to check.
@returns {boolean} Returns `true` if `func` is masked, else `false`.
|
isMasked
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return func + '';
} catch (e) {}
}
return '';
}
|
Converts `func` to its source code.
@private
@param {Function} func The function to convert.
@returns {string} Returns the source code.
|
toSource
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseIsNative(value) {
if (!isObject_1(value) || _isMasked(value)) {
return false;
}
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
return pattern.test(_toSource(value));
}
|
The base implementation of `_.isNative` without bad shim checks.
@private
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is a native function,
else `false`.
|
baseIsNative
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function getValue(object, key) {
return object == null ? undefined : object[key];
}
|
Gets the value at `key` of `object`.
@private
@param {Object} [object] The object to query.
@param {string} key The key of the property to get.
@returns {*} Returns the property value.
|
getValue
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function getNative(object, key) {
var value = _getValue(object, key);
return _baseIsNative(value) ? value : undefined;
}
|
Gets the native function at `key` of `object`.
@private
@param {Object} object The object to query.
@param {string} key The key of the method to get.
@returns {*} Returns the function if it's native, else `undefined`.
|
getNative
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hashClear() {
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
this.size = 0;
}
|
Removes all key-value entries from the hash.
@private
@name clear
@memberOf Hash
|
hashClear
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
|
Removes `key` and its value from the hash.
@private
@name delete
@memberOf Hash
@param {Object} hash The hash to modify.
@param {string} key The key of the value to remove.
@returns {boolean} Returns `true` if the entry was removed, else `false`.
|
hashDelete
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hashGet(key) {
var data = this.__data__;
if (_nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
}
|
Gets the hash value for `key`.
@private
@name get
@memberOf Hash
@param {string} key The key of the value to get.
@returns {*} Returns the entry value.
|
hashGet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hashHas(key) {
var data = this.__data__;
return _nativeCreate ? data[key] !== undefined : hasOwnProperty$3.call(data, key);
}
|
Checks if a hash value for `key` exists.
@private
@name has
@memberOf Hash
@param {string} key The key of the entry to check.
@returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
hashHas
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = _nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value;
return this;
}
|
Sets the hash `key` to `value`.
@private
@name set
@memberOf Hash
@param {string} key The key of the value to set.
@param {*} value The value to set.
@returns {Object} Returns the hash instance.
|
hashSet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
} // Add methods to `Hash`.
|
Creates a hash object.
@private
@constructor
@param {Array} [entries] The key-value pairs to cache.
|
Hash
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
|
Removes all key-value entries from the list cache.
@private
@name clear
@memberOf ListCache
|
listCacheClear
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function eq(value, other) {
return value === other || value !== value && other !== other;
}
|
Performs a
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
comparison between two values to determine if they are equivalent.
@static
@memberOf _
@since 4.0.0
@category Lang
@param {*} value The value to compare.
@param {*} other The other value to compare.
@returns {boolean} Returns `true` if the values are equivalent, else `false`.
@example
var object = { 'a': 1 };
var other = { 'a': 1 };
_.eq(object, object);
// => true
_.eq(object, other);
// => false
_.eq('a', 'a');
// => true
_.eq('a', Object('a'));
// => false
_.eq(NaN, NaN);
// => true
|
eq
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq_1(array[length][0], key)) {
return length;
}
}
return -1;
}
|
Gets the index at which the `key` is found in `array` of key-value pairs.
@private
@param {Array} array The array to inspect.
@param {*} key The key to search for.
@returns {number} Returns the index of the matched value, else `-1`.
|
assocIndexOf
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function listCacheDelete(key) {
var data = this.__data__,
index = _assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
|
Removes `key` and its value from the list cache.
@private
@name delete
@memberOf ListCache
@param {string} key The key of the value to remove.
@returns {boolean} Returns `true` if the entry was removed, else `false`.
|
listCacheDelete
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function listCacheGet(key) {
var data = this.__data__,
index = _assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
|
Gets the list cache value for `key`.
@private
@name get
@memberOf ListCache
@param {string} key The key of the value to get.
@returns {*} Returns the entry value.
|
listCacheGet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function listCacheHas(key) {
return _assocIndexOf(this.__data__, key) > -1;
}
|
Checks if a list cache value for `key` exists.
@private
@name has
@memberOf ListCache
@param {string} key The key of the entry to check.
@returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
listCacheHas
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function listCacheSet(key, value) {
var data = this.__data__,
index = _assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
|
Sets the list cache `key` to `value`.
@private
@name set
@memberOf ListCache
@param {string} key The key of the value to set.
@param {*} value The value to set.
@returns {Object} Returns the list cache instance.
|
listCacheSet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
} // Add methods to `ListCache`.
|
Creates an list cache object.
@private
@constructor
@param {Array} [entries] The key-value pairs to cache.
|
ListCache
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new _Hash(),
'map': new (_Map || _ListCache)(),
'string': new _Hash()
};
}
|
Removes all key-value entries from the map.
@private
@name clear
@memberOf MapCache
|
mapCacheClear
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isKeyable(value) {
var type = typeof value;
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}
|
Checks if `value` is suitable for use as unique object key.
@private
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
isKeyable
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function getMapData(map, key) {
var data = map.__data__;
return _isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}
|
Gets the data for `map`.
@private
@param {Object} map The map to query.
@param {string} key The reference key.
@returns {*} Returns the map data.
|
getMapData
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function mapCacheDelete(key) {
var result = _getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
|
Removes `key` and its value from the map.
@private
@name delete
@memberOf MapCache
@param {string} key The key of the value to remove.
@returns {boolean} Returns `true` if the entry was removed, else `false`.
|
mapCacheDelete
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function mapCacheGet(key) {
return _getMapData(this, key).get(key);
}
|
Gets the map value for `key`.
@private
@name get
@memberOf MapCache
@param {string} key The key of the value to get.
@returns {*} Returns the entry value.
|
mapCacheGet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function mapCacheHas(key) {
return _getMapData(this, key).has(key);
}
|
Checks if a map value for `key` exists.
@private
@name has
@memberOf MapCache
@param {string} key The key of the entry to check.
@returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
mapCacheHas
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function mapCacheSet(key, value) {
var data = _getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
|
Sets the map `key` to `value`.
@private
@name set
@memberOf MapCache
@param {string} key The key of the value to set.
@param {*} value The value to set.
@returns {Object} Returns the map cache instance.
|
mapCacheSet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
} // Add methods to `MapCache`.
|
Creates a map cache object to store key-value pairs.
@private
@constructor
@param {Array} [entries] The key-value pairs to cache.
|
MapCache
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function memoize(func, resolver) {
if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function () {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || _MapCache)();
return memoized;
} // Expose `MapCache`.
|
Creates a function that memoizes the result of `func`. If `resolver` is
provided, it determines the cache key for storing the result based on the
arguments provided to the memoized function. By default, the first argument
provided to the memoized function is used as the map cache key. The `func`
is invoked with the `this` binding of the memoized function.
**Note:** The cache is exposed as the `cache` property on the memoized
function. Its creation may be customized by replacing the `_.memoize.Cache`
constructor with one whose instances implement the
[`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
method interface of `clear`, `delete`, `get`, `has`, and `set`.
@static
@memberOf _
@since 0.1.0
@category Function
@param {Function} func The function to have its output memoized.
@param {Function} [resolver] The function to resolve the cache key.
@returns {Function} Returns the new memoized function.
@example
var object = { 'a': 1, 'b': 2 };
var other = { 'c': 3, 'd': 4 };
var values = _.memoize(_.values);
values(object);
// => [1, 2]
values(other);
// => [3, 4]
object.a = 2;
values(object);
// => [1, 2]
// Modify the result cache.
values.cache.set(object, ['a', 'b']);
values(object);
// => ['a', 'b']
// Replace `_.memoize.Cache`.
_.memoize.Cache = WeakMap;
|
memoize
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
memoized = function () {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
}
|
Creates a function that memoizes the result of `func`. If `resolver` is
provided, it determines the cache key for storing the result based on the
arguments provided to the memoized function. By default, the first argument
provided to the memoized function is used as the map cache key. The `func`
is invoked with the `this` binding of the memoized function.
**Note:** The cache is exposed as the `cache` property on the memoized
function. Its creation may be customized by replacing the `_.memoize.Cache`
constructor with one whose instances implement the
[`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
method interface of `clear`, `delete`, `get`, `has`, and `set`.
@static
@memberOf _
@since 0.1.0
@category Function
@param {Function} func The function to have its output memoized.
@param {Function} [resolver] The function to resolve the cache key.
@returns {Function} Returns the new memoized function.
@example
var object = { 'a': 1, 'b': 2 };
var other = { 'c': 3, 'd': 4 };
var values = _.memoize(_.values);
values(object);
// => [1, 2]
values(other);
// => [3, 4]
object.a = 2;
values(object);
// => [1, 2]
// Modify the result cache.
values.cache.set(object, ['a', 'b']);
values(object);
// => ['a', 'b']
// Replace `_.memoize.Cache`.
_.memoize.Cache = WeakMap;
|
memoized
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function memoizeCapped(func) {
var result = memoize_1(func, function (key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
|
A specialized version of `_.memoize` which clears the memoized function's
cache when it exceeds `MAX_MEMOIZE_SIZE`.
@private
@param {Function} func The function to have its output memoized.
@returns {Function} Returns the new memoized function.
|
memoizeCapped
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
|
A specialized version of `_.map` for arrays without support for iteratee
shorthands.
@private
@param {Array} [array] The array to iterate over.
@param {Function} iteratee The function invoked per iteration.
@returns {Array} Returns the new mapped array.
|
arrayMap
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray_1(value)) {
// Recursively convert values (susceptible to call stack limits).
return _arrayMap(value, baseToString) + '';
}
if (isSymbol_1(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
}
|
The base implementation of `_.toString` which doesn't convert nullish
values to empty strings.
@private
@param {*} value The value to process.
@returns {string} Returns the string.
|
baseToString
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function toString(value) {
return value == null ? '' : _baseToString(value);
}
|
Converts `value` to a string. An empty string is returned for `null`
and `undefined` values. The sign of `-0` is preserved.
@static
@memberOf _
@since 4.0.0
@category Lang
@param {*} value The value to convert.
@returns {string} Returns the converted string.
@example
_.toString(null);
// => ''
_.toString(-0);
// => '-0'
_.toString([1, 2, 3]);
// => '1,2,3'
|
toString
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function castPath(value, object) {
if (isArray_1(value)) {
return value;
}
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
}
|
Casts `value` to a path array if it's not one.
@private
@param {*} value The value to inspect.
@param {Object} [object] The object to query keys on.
@returns {Array} Returns the cast property path array.
|
castPath
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function toKey(value) {
if (typeof value == 'string' || isSymbol_1(value)) {
return value;
}
var result = value + '';
return result == '0' && 1 / value == -INFINITY$1 ? '-0' : result;
}
|
Converts `value` to a string key if it's not a string or symbol.
@private
@param {*} value The value to inspect.
@returns {string|symbol} Returns the key.
|
toKey
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseGet(object, path) {
path = _castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[_toKey(path[index++])];
}
return index && index == length ? object : undefined;
}
|
The base implementation of `_.get` without support for default values.
@private
@param {Object} object The object to query.
@param {Array|string} path The path of the property to get.
@returns {*} Returns the resolved value.
|
baseGet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseAssignValue(object, key, value) {
if (key == '__proto__' && _defineProperty) {
_defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
|
The base implementation of `assignValue` and `assignMergeValue` without
value checks.
@private
@param {Object} object The object to modify.
@param {string} key The key of the property to assign.
@param {*} value The value to assign.
|
baseAssignValue
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty$4.call(object, key) && eq_1(objValue, value)) || value === undefined && !(key in object)) {
_baseAssignValue(object, key, value);
}
}
|
Assigns `value` to `key` of `object` if the existing value is not equivalent
using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons.
@private
@param {Object} object The object to modify.
@param {string} key The key of the property to assign.
@param {*} value The value to assign.
|
assignValue
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
|
Checks if `value` is a valid array-like index.
@private
@param {*} value The value to check.
@param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
@returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
isIndex
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseSet(object, path, value, customizer) {
if (!isObject_1(object)) {
return object;
}
path = _castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = _toKey(path[index]),
newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject_1(objValue) ? objValue : _isIndex(path[index + 1]) ? [] : {};
}
}
_assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
|
The base implementation of `_.set`.
@private
@param {Object} object The object to modify.
@param {Array|string} path The path of the property to set.
@param {*} value The value to set.
@param {Function} [customizer] The function to customize path creation.
@returns {Object} Returns `object`.
|
baseSet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = _baseGet(object, path);
if (predicate(value, path)) {
_baseSet(result, _castPath(path, object), value);
}
}
return result;
}
|
The base implementation of `_.pickBy` without support for iteratee shorthands.
@private
@param {Object} object The source object.
@param {string[]} paths The property paths to pick.
@param {Function} predicate The function invoked per property.
@returns {Object} Returns the new object.
|
basePickBy
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
|
The base implementation of `_.hasIn` without support for deep paths.
@private
@param {Object} [object] The object to query.
@param {Array|string} key The key to check.
@returns {boolean} Returns `true` if `key` exists, else `false`.
|
baseHasIn
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseIsArguments(value) {
return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
}
|
The base implementation of `_.isArguments`.
@private
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is an `arguments` object,
|
baseIsArguments
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
}
|
Checks if `value` is a valid array-like length.
**Note:** This method is loosely based on
[`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
@static
@memberOf _
@since 4.0.0
@category Lang
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is a valid length, else `false`.
@example
_.isLength(3);
// => true
_.isLength(Number.MIN_VALUE);
// => false
_.isLength(Infinity);
// => false
_.isLength('3');
// => false
|
isLength
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hasPath(object, path, hasFunc) {
path = _castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = _toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength_1(length) && _isIndex(key, length) && (isArray_1(object) || isArguments_1(object));
}
|
Checks if `path` exists on `object`.
@private
@param {Object} object The object to query.
@param {Array|string} path The path to check.
@param {Function} hasFunc The function to check properties.
@returns {boolean} Returns `true` if `path` exists, else `false`.
|
hasPath
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function hasIn(object, path) {
return object != null && _hasPath(object, path, _baseHasIn);
}
|
Checks if `path` is a direct or inherited property of `object`.
@static
@memberOf _
@since 4.0.0
@category Object
@param {Object} object The object to query.
@param {Array|string} path The path to check.
@returns {boolean} Returns `true` if `path` exists, else `false`.
@example
var object = _.create({ 'a': _.create({ 'b': 2 }) });
_.hasIn(object, 'a');
// => true
_.hasIn(object, 'a.b');
// => true
_.hasIn(object, ['a', 'b']);
// => true
_.hasIn(object, 'b');
// => false
|
hasIn
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function basePick(object, paths) {
return _basePickBy(object, paths, function (value, path) {
return hasIn_1(object, path);
});
}
|
The base implementation of `_.pick` without support for individual
property identifiers.
@private
@param {Object} object The source object.
@param {string[]} paths The property paths to pick.
@returns {Object} Returns the new object.
|
basePick
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
|
Appends the elements of `values` to `array`.
@private
@param {Array} array The array to modify.
@param {Array} values The values to append.
@returns {Array} Returns `array`.
|
arrayPush
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function isFlattenable(value) {
return isArray_1(value) || isArguments_1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
|
Checks if `value` is a flattenable `arguments` object or array.
@private
@param {*} value The value to check.
@returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
isFlattenable
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = _isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
_arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
|
The base implementation of `_.flatten` with support for restricting flattening.
@private
@param {Array} array The array to flatten.
@param {number} depth The maximum recursion depth.
@param {boolean} [predicate=isFlattenable] The function invoked per iteration.
@param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
@param {Array} [result=[]] The initial result value.
@returns {Array} Returns the new flattened array.
|
baseFlatten
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? _baseFlatten(array, 1) : [];
}
|
Flattens `array` a single level deep.
@static
@memberOf _
@since 0.1.0
@category Array
@param {Array} array The array to flatten.
@returns {Array} Returns the new flattened array.
@example
_.flatten([1, [2, [3, [4]], 5]]);
// => [1, 2, [3, [4]], 5]
|
flatten
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
|
A faster alternative to `Function#apply`, this function invokes `func`
with the `this` binding of `thisArg` and the arguments of `args`.
@private
@param {Function} func The function to invoke.
@param {*} thisArg The `this` binding of `func`.
@param {Array} args The arguments to invoke `func` with.
@returns {*} Returns the result of `func`.
|
apply
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/bin-prettier.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
|
Apache-2.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.