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 select( selector, context, results, seed ) { var i, tokens, token, type, find, match = tokenize( selector ); if ( !seed ) { // Try to minimize operations if there is only one group if ( match.length === 1 ) { // Take a shortcut and set the context if the root selector is an ID tokens = match[0]...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
select
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
createOptions
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
fire = function( data ) { memory = options.memory && data; fired = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; firing = true; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
fire
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; if( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !( --remaining ) ) { defer...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
updateFunc
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function internalData( elem, name, data, pvt /* Internal Use Only */ ){ if ( !jQuery.acceptData( elem ) ) { return; } var ret, thisCache, internalKey = jQuery.expando, // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
internalData
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function internalRemoveData( elem, name, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache e...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
internalRemoveData
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
dataAttr
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
isEmptyDataObject
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
next = function() { jQuery.dequeue( elem, type ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
next
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
resolve
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function returnTrue() { return true; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
returnTrue
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function returnFalse() { return false; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
returnFalse
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
safeActiveElement
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
handler
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function sibling( cur, dir ) { do { cur = cur[ dir ]; } while ( cur && cur.nodeType !== 1 ); return cur; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
sibling
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; }); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( e...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
winnow
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
createSafeFragment
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName("tbody")[0] || elem.appendChild( elem.ownerDocument.createElement("tbody") ) : elem; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
manipulationTarget
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function disableScript( elem ) { elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; return elem; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
disableScript
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[1]; } else { elem.removeAttribute("type"); } return elem; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
restoreScript
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function setGlobalEval( elems, refElements ) { var elem, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); } }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
setGlobalEval
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
cloneCopyEvent
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function fixCloneNodeIssues( src, dest ) { var nodeName, e, data; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } nodeName = dest.nodeName.toLowerCase(); // IE6-8 copies events bound via attachEvent when using cloneNode. if ( !jQuery.support.noCloneEvent && dest[ jQu...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
fixCloneNodeIssues
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function getAll( context, tag ) { var elems, elem, i = 0, found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : undefined; if ( !found ) { for ( foun...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
getAll
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function fixDefaultChecked( elem ) { if ( manipulation_rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
fixDefaultChecked
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function vendorPropName( style, name ) { // shortcut for names that are not vendor prefixed if ( name in style ) { return name; } // check for vendor prefixed names var capName = name.charAt(0).toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
vendorPropName
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function isHidden( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
isHidden
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function showHide( elements, show ) { var display, elem, hidden, values = [], index = 0, length = elements.length; for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } values[ index ] = jQuery._data( elem, "olddisplay" ); display = elem.style.display; i...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
showHide
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function setPositiveNumber( elem, value, subtract ) { var matches = rnumsplit.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : value; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
setPositiveNumber
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i = extra === ( isBorderBox ? "border" : "content" ) ? // If we already have the right measurement, avoid augmentation 4 : // Otherwise initialize for horizontal or vertical properties name === "width" ? 1 : 0, val = 0; for ( ; ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
augmentWidthOrHeight
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function getWidthOrHeight( elem, name, extra ) { // Start with offset property, which is equivalent to the border-box value var valueIsBorderBox = true, val = name === "width" ? elem.offsetWidth : elem.offsetHeight, styles = getStyles( elem ), isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSiz...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
getWidthOrHeight
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function css_defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible ifra...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
css_defaultDisplay
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), display = jQuery.css( elem[0], "display" ); elem.remove(); return display; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
actualDisplay
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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 ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
add
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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 ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
buildParams
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
addToPrefiltersOrTransports
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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 ) {...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
inspectPrefiltersOrTransports
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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 && !inspe...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
inspect
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function ajaxExtend( target, src ) { var deep, key, 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...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
ajaxExtend
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
done
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function ajaxHandleResponses( s, jqXHR, responses ) { var firstDataType, ct, finalDataType, type, 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 || j...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
ajaxHandleResponses
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
ajaxConvert
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
createStandardXHR
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function createActiveXHR() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch( e ) {} }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
createActiveXHR
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function createFxNow() { setTimeout(function() { fxNow = undefined; }); return ( fxNow = jQuery.now() ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
createFxNow
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function createTween( value, prop, animation ) { var tween, collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( (tween = collection[ index ].call( animation, prop, value )) ) { // we're done with this property ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
createTween
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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; } ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
Animation
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) temp = remaining / animation.duration || 0, ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
tick
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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 ];...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
propFilter
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function defaultPrefilter( elem, props, opts ) { /* jshint validthis: true */ var prop, value, toggle, tween, hooks, oldfire, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHidden( elem ), dataShow = jQuery._data( elem, "fxshow" ); // handle queue: false promises if ( !opts.queue...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
defaultPrefilter
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
Tween
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.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 || jQuery._data( this, "finish" ) ) { anim.stop( true ); } }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
doAnimation
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
stopQueue
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function genFx( type, includeWidth ) { var which, attrs = { height: type }, i = 0; // if we include width, step value is 1 to do all cssExpand values, // if we don't include width, step value is 2 to skip over Left and Right includeWidth = includeWidth? 1 : 0; for( ; i < 4 ; i += 2 - includeWidth ) { which ...
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
genFx
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; }
Utility function for retrieving the text value of an array of DOM nodes @param {Array|Element} elem
getWindow
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/jquery-1.10.2.js
MIT
function gumCallback(stream) { if (session.streamCallback) { session.streamCallback(stream); } connection.renegotiate(remoteUserId); }
iOS 11 doesn't allow automatic play and rejects **
gumCallback
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
MIT
function applyConstraints(stream, mediaConstraints) { if (!stream) { if (!!connection.enableLogs) { console.error('No stream to applyConstraints.'); } return; } if (mediaConstraints.audio) { stream.g...
iOS 11 doesn't allow automatic play and rejects **
applyConstraints
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
MIT
function replaceTrack(track, remoteUserId, isVideoTrack) { if (remoteUserId) { mPeer.replaceTrack(track, remoteUserId, isVideoTrack); return; } connection.peers.getAllParticipants().forEach(function(participant) { mPeer.replaceTrack(tr...
iOS 11 doesn't allow automatic play and rejects **
replaceTrack
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
MIT
function gumCallback(stream) { connection.replaceTrack(stream, remoteUserId, isVideoTrack || session.video || session.screen); }
iOS 11 doesn't allow automatic play and rejects **
gumCallback
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
MIT
function keepNextBroadcasterOnServer() { if (!connection.isInitiator) return; if (connection.session.oneway || connection.session.broadcast || connection.direction !== 'many-to-many') { return; } var firstBroadcaster = connection.broadcasters[0]; ...
iOS 11 doesn't allow automatic play and rejects **
keepNextBroadcasterOnServer
javascript
muaz-khan/WebRTC-Experiment
RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCMultiConnection-SignalR/RTCMultiConnection/Scripts/RTCMultiConnection.js
MIT
function computeOffsetPixels(offset, contextHeight) { const pixelOffset = parseOffsetAsPixels(offset); if (typeof pixelOffset === 'number') { return pixelOffset; } const percentOffset = parseOffsetAsPercentage(offset); if (typeof percentOffset === 'number') { return percentOffset * contextHeight; ...
@param {string|number} offset @param {number} contextHeight @return {number} A number representing `offset` converted into pixels.
computeOffsetPixels
javascript
civiccc/react-waypoint
src/computeOffsetPixels.js
https://github.com/civiccc/react-waypoint/blob/master/src/computeOffsetPixels.js
MIT
function ensureRefIsProvidedByChild(children, ref) { if (children && !isDOMElement(children) && !ref) { throw new Error(errorMessage); } }
Raise an error if "children" is not a DOM Element and there is no ref provided to Waypoint @param {?React.element} children @param {?HTMLElement} ref @return {undefined}
ensureRefIsProvidedByChild
javascript
civiccc/react-waypoint
src/ensureRefIsUsedByChild.js
https://github.com/civiccc/react-waypoint/blob/master/src/ensureRefIsUsedByChild.js
MIT
function getCurrentPosition(bounds) { if (bounds.viewportBottom - bounds.viewportTop === 0) { return INVISIBLE; } // top is within the viewport if (bounds.viewportTop <= bounds.waypointTop && bounds.waypointTop <= bounds.viewportBottom) { return INSIDE; } // bottom is within the viewport i...
@param {object} bounds An object with bounds data for the waypoint and scrollable parent @return {string} The current position of the waypoint in relation to the visible portion of the scrollable parent. One of the constants `ABOVE`, `BELOW`, `INSIDE` or `INVISIBLE`.
getCurrentPosition
javascript
civiccc/react-waypoint
src/getCurrentPosition.js
https://github.com/civiccc/react-waypoint/blob/master/src/getCurrentPosition.js
MIT
function isDOMElement(Component) { return (typeof Component.type === 'string'); }
When an element's type is a string, it represents a DOM node with that tag name https://facebook.github.io/react/blog/2015/12/18/react-components-elements-and-instances.html#dom-elements @param {React.element} Component @return {bool} Whether the component is a DOM Element
isDOMElement
javascript
civiccc/react-waypoint
src/isDOMElement.js
https://github.com/civiccc/react-waypoint/blob/master/src/isDOMElement.js
MIT
function parseOffsetAsPercentage(str) { if (str.slice(-1) === '%') { return parseFloat(str.slice(0, -1)) / 100; } return undefined; }
Attempts to parse the offset provided as a prop as a percentage. For instance, if the component has been provided with the string "20%" as a value of one of the offset props. If the value matches, then it returns a numeric version of the prop. For instance, "20%" would become `0.2`. If `str` isn't a percentage, then `u...
parseOffsetAsPercentage
javascript
civiccc/react-waypoint
src/parseOffsetAsPercentage.js
https://github.com/civiccc/react-waypoint/blob/master/src/parseOffsetAsPercentage.js
MIT
function parseOffsetAsPixels(str) { if (!isNaN(parseFloat(str)) && isFinite(str)) { return parseFloat(str); } if (str.slice(-2) === 'px') { return parseFloat(str.slice(0, -2)); } return undefined; }
Attempts to parse the offset provided as a prop as a pixel value. If parsing fails, then `undefined` is returned. Three examples of values that will be successfully parsed are: `20` "20px" "20" @param {string|number} str A string of the form "{number}" or "{number}px", or just a number. @return {number|undefined} Th...
parseOffsetAsPixels
javascript
civiccc/react-waypoint
src/parseOffsetAsPixels.js
https://github.com/civiccc/react-waypoint/blob/master/src/parseOffsetAsPixels.js
MIT
_findLongestCommonSequence = function (seq1, seq2, seq1IsInLcs, seq2IsInLcs) { if (!_areTypeOf(Array, seq1, seq2)) { throw new Error('Array parameters are required') } // Deal with edge case if (_isEmptyArray(seq1) || _isEmptyArray(seq2)) { return [] } // Function to calculate lcs ...
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
_findLongestCommonSequence
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
_findLongestCommonSequence = function (seq1, seq2, seq1IsInLcs, seq2IsInLcs) { if (!_areTypeOf(Array, seq1, seq2)) { throw new Error('Array parameters are required') } // Deal with edge case if (_isEmptyArray(seq1) || _isEmptyArray(seq2)) { return [] } // Function to calculate lcs ...
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
_findLongestCommonSequence
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
lcsLens = function (xs, ys) { let i let j let prev const curr = _getInitializedArray(ys.length + 1, 0) for (i = 0; i < xs.length; i++) { prev = curr.slice(0) for (j = 0; j < ys.length; j++) { if (xs[i] === ys[j]) { curr[j + 1] = prev[j] + 1 ...
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
lcsLens
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
lcsLens = function (xs, ys) { let i let j let prev const curr = _getInitializedArray(ys.length + 1, 0) for (i = 0; i < xs.length; i++) { prev = curr.slice(0) for (j = 0; j < ys.length; j++) { if (xs[i] === ys[j]) { curr[j + 1] = prev[j] + 1 ...
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
lcsLens
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
_findLcs = function (xs, xidx, xIsIn, ys) { let i let xb let xe let llB let llE let pivot let max let yb let ye const nx = xs.length const ny = ys.length if (nx === 0) { return [] } if (nx === 1) { if (_hasValue(ys, xs[...
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
_findLcs
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
_findLcs = function (xs, xidx, xIsIn, ys) { let i let xb let xe let llB let llE let pivot let max let yb let ye const nx = xs.length const ny = ys.length if (nx === 0) { return [] } if (nx === 1) { if (_hasValue(ys, xs[...
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
_findLcs
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
regularizeLeadingContext = function (context) { if (context.length === 0 || contextLines === 0) { return [] } const contextStartPos = Math.max(context.length - contextLines, 0) return context.slice(contextStartPos) }
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
regularizeLeadingContext
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
regularizeLeadingContext = function (context) { if (context.length === 0 || contextLines === 0) { return [] } const contextStartPos = Math.max(context.length - contextLines, 0) return context.slice(contextStartPos) }
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
regularizeLeadingContext
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
regularizeTrailingContext = function (context) { if (context.length === 0 || contextLines === 0) { return [] } return context.slice(0, Math.min(contextLines, context.length)) }
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
regularizeTrailingContext
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
regularizeTrailingContext = function (context) { if (context.length === 0 || contextLines === 0) { return [] } return context.slice(0, Math.min(contextLines, context.length)) }
Finds longest common sequence between two sequences @see {@link https://wordaligned.org/articles/longest-common-subsequence}
regularizeTrailingContext
javascript
locutusjs/locutus
src/php/xdiff/xdiff_string_diff.js
https://github.com/locutusjs/locutus/blob/master/src/php/xdiff/xdiff_string_diff.js
MIT
function trim (str) { return str.trim().replace(/^"(.*)"$/, '$1').replace(/^'(.*)'$/, '$1'); }
Meta Helper @description Generate meta tags for HTML header @example <%- meta(post) %>
trim
javascript
locutusjs/locutus
website/themes/icarus/scripts/meta.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/scripts/meta.js
MIT
function split (str, sep) { var result = []; var matched = null; while (matched = sep.exec(str)) { result.push(matched[0]); } return result; }
Meta Helper @description Generate meta tags for HTML header @example <%- meta(post) %>
split
javascript
locutusjs/locutus
website/themes/icarus/scripts/meta.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/scripts/meta.js
MIT
function section(title) { return $('<section>').addClass('ins-section').append($('<header>').addClass('ins-section-header').text(title)) }
Insight search plugin @author PPOffice { @link https://github.com/ppoffice }
section
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function searchItem(icon, title, slug, preview, url) { return $('<div>') .addClass('ins-selectable') .addClass('ins-search-item') .append( $('<header>') .append( $('<i>') .addClass('fa') .addClass('fa-' + icon), ) .appen...
Insight search plugin @author PPOffice { @link https://github.com/ppoffice }
searchItem
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function sectionFactory(type, array) { var sectionTitle var $searchItems if (array.length === 0) return null sectionTitle = CONFIG.TRANSLATION[type] switch (type) { case 'POSTS': case 'PAGES': $searchItems = array.map(function (item) { // Use config.root instead of perm...
Insight search plugin @author PPOffice { @link https://github.com/ppoffice }
sectionFactory
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function extractToSet(json, key) { var values = {} var entries = json.pages.concat(json.posts) entries.forEach(function (entry) { if (entry[key]) { entry[key].forEach(function (value) { values[value.name] = value }) } }) var result = [] for (var key in value...
Insight search plugin @author PPOffice { @link https://github.com/ppoffice }
extractToSet
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function parseKeywords(keywords) { return keywords .split(' ') .filter(function (keyword) { return !!keyword }) .map(function (keyword) { return keyword.toUpperCase() }) }
Insight search plugin @author PPOffice { @link https://github.com/ppoffice }
parseKeywords
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function filter(keywords, obj, fields) { var result = false var keywordArray = parseKeywords(keywords) var containKeywords = keywordArray.filter(function (keyword) { var containFields = fields.filter(function (field) { if (!obj.hasOwnProperty(field)) return false if (obj[field].toUpper...
Judge if a given post/page/category/tag contains all of the keywords. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches
filter
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function filterFactory(keywords) { return { POST: function (obj) { return filter(keywords, obj, ['title', 'text']) }, PAGE: function (obj) { return filter(keywords, obj, ['title', 'text']) }, CATEGORY: function (obj) { return filter(keywords, obj, ['name', 'slug...
Judge if a given post/page/category/tag contains all of the keywords. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches
filterFactory
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function weight(keywords, obj, fields, weights) { var value = 0 parseKeywords(keywords).forEach(function (keyword) { var pattern = new RegExp(keyword, 'img') // Global, Multi-line, Case-insensitive fields.forEach(function (field, index) { if (obj.hasOwnProperty(field)) { var matche...
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
weight
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function weightFactory(keywords) { return { POST: function (obj) { return weight(keywords, obj, ['title', 'text'], [3, 1]) }, PAGE: function (obj) { return weight(keywords, obj, ['title', 'text'], [3, 1]) }, CATEGORY: function (obj) { return weight(keywords, obj...
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
weightFactory
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function search(json, keywords) { var WEIGHTS = weightFactory(keywords) var FILTERS = filterFactory(keywords) var posts = json.posts var pages = json.pages var tags = extractToSet(json, 'tags') var categories = extractToSet(json, 'categories') return { posts: posts .filter(FILT...
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
search
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function searchResultToDOM(searchResult) { $container.empty() for (var key in searchResult) { $container.append(sectionFactory(key.toUpperCase(), searchResult[key])) } }
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
searchResultToDOM
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function scrollTo($item) { if ($item.length === 0) return var wrapperHeight = $wrapper[0].clientHeight var itemTop = $item.position().top - $wrapper.scrollTop() var itemBottom = $item[0].clientHeight + $item.position().top if (itemBottom > wrapperHeight + $wrapper.scrollTop()) { $wrapper.scrol...
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
scrollTo
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function selectItemByDiff(value) { var $items = $.makeArray($container.find('.ins-selectable')) var prevPosition = -1 $items.forEach(function (item, index) { if ($(item).hasClass('active')) { prevPosition = index return } }) var nextPosition = ($items.length + prevPositio...
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
selectItemByDiff
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function gotoLink($item) { if ($item && $item.length) { location.href = $item.attr('data-url') } }
Calculate the weight of a matched post/page/category/tag. @param Object obj Object to be weighted @param Array<String> fields Object's fields to find matches @param Array<Integer> weights Weight of every field
gotoLink
javascript
locutusjs/locutus
website/themes/icarus/source/js/insight.js
https://github.com/locutusjs/locutus/blob/master/website/themes/icarus/source/js/insight.js
MIT
function shutdownWorkers (signal) { return new Promise((resolve) => { if (!cluster.isMaster) { return resolve() } const wIds = Object.keys(cluster.workers) if (wIds.length === 0) { return resolve() } // Filter all the valid workers const workers = wIds.map(id => cluster.workers[id]).filter(v => v)...
Shutdown all worker processes. From https://medium.com/@gaurav.lahoti/graceful-shutdown-of-node-js-workers-dd58bbff9e30 @param signal Signal to send to the workers
shutdownWorkers
javascript
godaddy/terminus
example/express.cluster.js
https://github.com/godaddy/terminus/blob/master/example/express.cluster.js
MIT
fn = () => { ++funcRun workersAlive = 0 workers.forEach(worker => { if (!worker.isDead()) { ++workersAlive if (funcRun === 1) { // On the first execution of the function, send the received signal to all the workers // https://github.com/nodejs/node-v0.x-...
Shutdown all worker processes. From https://medium.com/@gaurav.lahoti/graceful-shutdown-of-node-js-workers-dd58bbff9e30 @param signal Signal to send to the workers
fn
javascript
godaddy/terminus
example/express.cluster.js
https://github.com/godaddy/terminus/blob/master/example/express.cluster.js
MIT
fn = () => { ++funcRun workersAlive = 0 workers.forEach(worker => { if (!worker.isDead()) { ++workersAlive if (funcRun === 1) { // On the first execution of the function, send the received signal to all the workers // https://github.com/nodejs/node-v0.x-...
Shutdown all worker processes. From https://medium.com/@gaurav.lahoti/graceful-shutdown-of-node-js-workers-dd58bbff9e30 @param signal Signal to send to the workers
fn
javascript
godaddy/terminus
example/express.cluster.js
https://github.com/godaddy/terminus/blob/master/example/express.cluster.js
MIT
function markFunction( fn ) { fn[ expando ] = true; return fn; }
Mark a function for special use by Sizzle @param {Function} fn The function to mark
markFunction
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function assert( fn ) { var el = document.createElement( "fieldset" ); try { return !!fn( el ); } catch ( e ) { return false; } finally { // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } // release memory in IE el = null; } }
Support testing using an element @param {Function} fn Passed the created element and returns a boolean result
assert
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function addHandle( attrs, handler ) { var arr = attrs.split( "|" ), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[ i ] ] = handler; } }
Adds the same handler for all of the specified attrs @param {String} attrs Pipe-separated list of attributes @param {Function} handler The method that will be applied
addHandle
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( ( cur = cur.nextSibling ) ) { if ( cur ===...
Checks document order of two siblings @param {Element} a @param {Element} b @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
siblingCheck
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; }
Returns a function to use in pseudos for input types @param {String} type
createInputPseudo
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT