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 nodeName( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }
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
nodeName
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function winnow( elements, qualifier, not ) { if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qu...
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
winnow
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function sibling( cur, dir ) { while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; }
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
sibling
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; }
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
createOptions
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
fire = function() { // Enforce single-firing locked = locked || options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingInd...
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
fire
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function Identity( v ) { return v; }
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
Identity
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function Thrower( ex ) { throw ex; }
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
Thrower
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function adoptValue( value, resolve, reject, noValue ) { var method; try { // Check for promise aspect first to privilege synchronous behavior if ( value && isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables } else if ( value && isFunctio...
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
adoptValue
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function resolve( depth, deferred, handler, special ) { return function() { var that = this, args = arguments, mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double-resolution attempts if ( depth < maxDepth ) { return; } returned = handler.apply( that, args ); ...
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
mightThrow
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
updateFunc = function( i ) { return function( value ) { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { master.resolveWith( resolveContexts, resolveValues ); } }; }
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
updateFunc
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); }
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
completed
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( toType( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ...
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
access
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function fcamelCase( all, letter ) { return letter.toUpperCase(); }
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
fcamelCase
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function camelCase( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }
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
camelCase
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }
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
acceptData
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function Data() { this.expando = jQuery.expando + Data.uid++; }
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
Data
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function getData( data ) { if ( data === "true" ) { return true; } if ( data === "false" ) { return false; } if ( data === "null" ) { return null; } // Only convert to a number if it doesn't change the string if ( data === +data + "" ) { return +data; } if ( rbrace.test( data ) ) { return JSON.p...
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
getData
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data...
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
dataAttr
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 comput...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 ( nam...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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.cssNumbe...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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.removeChi...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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; ...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 !==...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, contains, 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(...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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; } f...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 ); even...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 sta...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 f...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 && jQuery.co...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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; } ...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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;ov...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 neede...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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; } ...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( nam...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || 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
finalPropName
javascript
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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 ) ) + ( match...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style var styles = getStyles( elem ), val = curCSS( elem, dimension, styles ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", valueIsBorderBox = isBorderBox; // Support: Firefox <=54 // Return a conf...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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-scala...
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
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
syzoj/syzoj
static/cdnjs/jquery/3.3.1/jquery.slim.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jquery/3.3.1/jquery.slim.js
MIT
function diff_match_patch() { // Defaults. // Redefine these in your program to override the defaults. // Number of seconds to map a diff before giving up (0 for infinity). this.Diff_Timeout = 1.0; // Cost of an empty edit operation in terms of edit characters. this.Diff_EditCost = 4; // At what point i...
Class containing the diff, match and patch methods. @constructor
diff_match_patch
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function diff_linesToCharsMunge_(text) { var chars = ''; // Walk the text, pulling out a substring for each line. // text.split('\n') would would temporarily double our memory footprint. // Modifying text would create many large strings to garbage collect. var lineStart = 0; var lineEnd = -1; ...
Split a text into an array of strings. Reduce the texts to a string of hashes where each Unicode character represents one line. Modifies linearray and linehash through being a closure. @param {string} text String to encode. @return {string} Encoded string. @private
diff_linesToCharsMunge_
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function diff_halfMatchI_(longtext, shorttext, i) { // Start with a 1/4 length substring at position i as a seed. var seed = longtext.substring(i, i + Math.floor(longtext.length / 4)); var j = -1; var best_common = ''; var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b; whi...
Does a substring of shorttext exist within longtext such that the substring is at least half the length of longtext? Closure, but does not reference any external variables. @param {string} longtext Longer string. @param {string} shorttext Shorter string. @param {number} i Start index of quarter length substring within ...
diff_halfMatchI_
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function diff_cleanupSemanticScore_(one, two) { if (!one || !two) { // Edges are the best. return 5; } // Each port of this function behaves slightly differently due to // subtle differences in each language's definition of things like // 'whitespace'. Since this function's purpose is ...
Given two strings, compute a score representing whether the internal boundary falls on logical boundaries. Scores range from 5 (best) to 0 (worst). Closure, makes reference to regex patterns defined above. @param {string} one First string. @param {string} two Second string. @return {number} The score. @private
diff_cleanupSemanticScore_
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function match_bitapScore_(e, x) { var accuracy = e / pattern.length; var proximity = Math.abs(loc - x); if (!dmp.Match_Distance) { // Dodge divide by zero error. return proximity ? 1.0 : accuracy; } return accuracy + (proximity / dmp.Match_Distance); }
Compute and return the score for a match with e errors and x location. Accesses loc and pattern through being a closure. @param {number} e Number of errors in match. @param {number} x Location of match. @return {number} Overall score for match (0.0 = good, 1.0 = bad). @private
match_bitapScore_
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function cloneRegExp(re) { var regexMatch = /^\/(.*)\/([gimyu]*)$/.exec(re.toString()); return new RegExp(regexMatch[1], regexMatch[2]); }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
cloneRegExp
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function clone(arg) { if (typeof arg !== 'object') { return arg; } if (arg === null) { return null; } if (isArray(arg)) { return arg.map(clone); } if (arg instanceof Date) { return new Date(arg.getTime()); } if (arg instanceof RegExp) { return cloneRegExp(arg); } var cloned = {...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
clone
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
DiffContext = function DiffContext(left, right) { this.left = left; this.right = right; this.pipe = 'diff'; }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
DiffContext
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
PatchContext = function PatchContext(left, delta) { this.left = left; this.delta = delta; this.pipe = 'patch'; }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
PatchContext
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
ReverseContext = function ReverseContext(delta) { this.delta = delta; this.pipe = 'reverse'; }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
ReverseContext
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
DiffPatcher = function DiffPatcher(options) { this.processor = new Processor(options); this.processor.pipe(new Pipe('diff').append( nested.collectChildrenDiffFilter, trivial.diffFilter, dates.diffFilter, texts.diffFilter, nested.objectsDiffFilter, arrays.diffFilter ).shouldHaveResult()); ...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
DiffPatcher
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function arraysHaveMatchByRef(array1, array2, len1, len2) { for (var index1 = 0; index1 < len1; index1++) { var val1 = array1[index1]; for (var index2 = 0; index2 < len2; index2++) { var val2 = array2[index2]; if (index1 !== index2 && val1 === val2) { return true; } } } }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
arraysHaveMatchByRef
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function matchItems(array1, array2, index1, index2, context) { var value1 = array1[index1]; var value2 = array2[index2]; if (value1 === value2) { return true; } if (typeof value1 !== 'object' || typeof value2 !== 'object') { return false; } var objectHash = context.objectHash; if (!objectHash) {...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
matchItems
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
diffFilter = function arraysDiffFilter(context) { if (!context.leftIsArray) { return; } var matchContext = { objectHash: context.options && context.options.objectHash, matchByPosition: context.options && context.options.matchByPosition }; var commonHead = 0; var commonTail = 0; var index; v...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
diffFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
patchFilter = function nestedPatchFilter(context) { if (!context.nested) { return; } if (context.delta._t !== 'a') { return; } var index, index1; var delta = context.delta; var array = context.left; // first, separate removals, insertions and modifications var toRemove = []; var toInsert =...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
patchFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
collectChildrenPatchFilter = function collectChildrenPatchFilter(context) { if (!context || !context.children) { return; } if (context.delta._t !== 'a') { return; } var length = context.children.length; var child; for (var index = 0; index < length; index++) { child = context.children[index]; ...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
collectChildrenPatchFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
reverseFilter = function arraysReverseFilter(context) { if (!context.nested) { if (context.delta[2] === ARRAY_MOVE) { context.newName = '_' + context.delta[1]; context.setResult([context.delta[0], parseInt(context.childName.substr(1), 10), ARRAY_MOVE]).exit(); } return; } if (context.delta...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
reverseFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
reverseArrayDeltaIndex = function(delta, index, itemDelta) { if (typeof index === 'string' && index[0] === '_') { return parseInt(index.substr(1), 10); } else if (isArray(itemDelta) && itemDelta[2] === 0) { return '_' + index; } var reverseIndex = +index; for (var deltaIndex in delta) { var delta...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
reverseArrayDeltaIndex
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
collectChildrenReverseFilter = function collectChildrenReverseFilter(context) { if (!context || !context.children) { return; } if (context.delta._t !== 'a') { return; } var length = context.children.length; var child; var delta = { _t: 'a' }; for (var index = 0; index < length; index++) {...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
collectChildrenReverseFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
diffFilter = function datesDiffFilter(context) { if (context.left instanceof Date) { if (context.right instanceof Date) { if (context.left.getTime() !== context.right.getTime()) { context.setResult([context.left, context.right]); } else { context.setResult(undefined); } } els...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
diffFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
defaultMatch = function(array1, array2, index1, index2) { return array1[index1] === array2[index2]; }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
defaultMatch
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
lengthMatrix = function(array1, array2, match, context) { var len1 = array1.length; var len2 = array2.length; var x, y; // initialize empty matrix of len1+1 x len2+1 var matrix = [len1 + 1]; for (x = 0; x < len1 + 1; x++) { matrix[x] = [len2 + 1]; for (y = 0; y < len2 + 1; y++) { matrix[x][y]...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
lengthMatrix
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
backtrack = function(matrix, array1, array2, index1, index2, context) { if (index1 === 0 || index2 === 0) { return { sequence: [], indices1: [], indices2: [] }; } if (matrix.match(array1, array2, index1 - 1, index2 - 1, context)) { var subsequence = backtrack(matrix, array1, array2,...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
backtrack
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
get = function(array1, array2, match, context) { context = context || {}; var matrix = lengthMatrix(array1, array2, match || defaultMatch, context); var result = backtrack(matrix, array1, array2, array1.length, array2.length, context); if (typeof array1 === 'string' && typeof array2 === 'string') { result.s...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
get
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
collectChildrenDiffFilter = function collectChildrenDiffFilter(context) { if (!context || !context.children) { return; } var length = context.children.length; var child; var result = context.result; for (var index = 0; index < length; index++) { child = context.children[index]; if (typeof child....
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
collectChildrenDiffFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
objectsDiffFilter = function objectsDiffFilter(context) { if (context.leftIsArray || context.leftType !== 'object') { return; } var name, child, propertyFilter = context.options.propertyFilter; for (name in context.left) { if (!Object.prototype.hasOwnProperty.call(context.left, name)) { continue;...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
objectsDiffFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
patchFilter = function nestedPatchFilter(context) { if (!context.nested) { return; } if (context.delta._t) { return; } var name, child; for (name in context.delta) { child = new PatchContext(context.left[name], context.delta[name]); context.push(child, name); } context.exit(); }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
patchFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
collectChildrenPatchFilter = function collectChildrenPatchFilter(context) { if (!context || !context.children) { return; } if (context.delta._t) { return; } var length = context.children.length; var child; for (var index = 0; index < length; index++) { child = context.children[index]; if (...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
collectChildrenPatchFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
reverseFilter = function nestedReverseFilter(context) { if (!context.nested) { return; } if (context.delta._t) { return; } var name, child; for (name in context.delta) { child = new ReverseContext(context.delta[name]); context.push(child, name); } context.exit(); }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
reverseFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
collectChildrenReverseFilter = function collectChildrenReverseFilter(context) { if (!context || !context.children) { return; } if (context.delta._t) { return; } var length = context.children.length; var child; var delta = {}; for (var index = 0; index < length; index++) { child = context.chi...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
collectChildrenReverseFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
getDiffMatchPatch = function(required) { /*jshint camelcase: false */ if (!cachedDiffPatch) { var instance; if (typeof diff_match_patch !== 'undefined') { // already loaded, probably a browser instance = typeof diff_match_patch === 'function' ? new diff_match_patch() : new diff_match_pa...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
getDiffMatchPatch
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
diffFilter = function textsDiffFilter(context) { if (context.leftType !== 'string') { return; } var minLength = (context.options && context.options.textDiff && context.options.textDiff.minLength) || DEFAULT_MIN_LENGTH; if (context.left.length < minLength || context.right.length < minLength) { co...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
diffFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
patchFilter = function textsPatchFilter(context) { if (context.nested) { return; } if (context.delta[2] !== TEXT_DIFF) { return; } // text-diff, use a text-patch algorithm var patch = getDiffMatchPatch(true).patch; context.setResult(patch(context.left, context.delta[0])).exit(); }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
patchFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
textDeltaReverse = function(delta) { var i, l, lines, line, lineTmp, header = null, headerRegex = /^@@ +\-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, lineHeader, lineAdd, lineRemove; lines = delta.split('\n'); for (i = 0, l = lines.length; i < l; i++) { line = lines[i]; var lineStart = line.slice(0, 1); ...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
textDeltaReverse
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
reverseFilter = function textsReverseFilter(context) { if (context.nested) { return; } if (context.delta[2] !== TEXT_DIFF) { return; } // text-diff, use a text-diff algorithm context.setResult([textDeltaReverse(context.delta[0]), 0, TEXT_DIFF]).exit(); }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
reverseFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
diffFilter = function trivialMatchesDiffFilter(context) { if (context.left === context.right) { context.setResult(undefined).exit(); return; } if (typeof context.left === 'undefined') { if (typeof context.right === 'function') { throw new Error('functions are not supported'); } context.s...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
diffFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
patchFilter = function trivialMatchesPatchFilter(context) { if (typeof context.delta === 'undefined') { context.setResult(context.left).exit(); return; } context.nested = !isArray(context.delta); if (context.nested) { return; } if (context.delta.length === 1) { context.setResult(context.delt...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
patchFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
reverseFilter = function trivialReferseFilter(context) { if (typeof context.delta === 'undefined') { context.setResult(context.delta).exit(); return; } context.nested = !isArray(context.delta); if (context.nested) { return; } if (context.delta.length === 1) { context.setResult([context.delta...
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
reverseFilter
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
Pipe = function Pipe(name) { this.name = name; this.filters = []; }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
Pipe
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
Processor = function Processor(options){ this.selfOptions = options || {}; this.pipes = {}; }
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. @return {string} The GNU diff string.
Processor
javascript
syzoj/syzoj
static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/jsondiffpatch/0.2.5/jsondiffpatch-full.js
MIT
function g(e,t){if(void 0===t&&(t={}),!e)return M;if("string"==typeof e||m(e)){var n=c(e,t);if(n===k)return M;var o=function(e,t){return!!n(e,t)};return n.allBasenames&&(o.allBasenames=n.allBasenames), n.allPaths&&(o.allPaths=n.allPaths),o}return function(e,t){var n=v(Object.getOwnPropertyNames(e).map(function(i){retur...
")?e.substr(0,e.length-2):e}function f(e,t,i){var o=r.sep!==r.posix.sep?e.replace(S,r.sep):e,s=r.sep+o,a=i?function(e,i){return"string"!=typeof e||e!==o&&!n.endsWith(e,s)?null:t}:function(e,i){return"string"==typeof e&&e===o?t:null};return a.allPaths=[(i?"
g
javascript
syzoj/syzoj
static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
MIT
d=function(e,t,i){for(var o=void 0,s=0,a=n.length;s<a;s++){var l=n[s];l.requiresSiblings&&i&&(t||(t=r.basename(e)), o||(o=t.substr(0,t.length-r.extname(e).length)));var u=l(e,t,o,i);if(u)return u}return null}
")?e.substr(0,e.length-2):e}function f(e,t,i){var o=r.sep!==r.posix.sep?e.replace(S,r.sep):e,s=r.sep+o,a=i?function(e,i){return"string"!=typeof e||e!==o&&!n.endsWith(e,s)?null:t}:function(e,i){return"string"==typeof e&&e===o?t:null};return a.allPaths=[(i?"
d
javascript
syzoj/syzoj
static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
MIT
function s(e,t){ if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!s(e[i],t[i]))return!1}else{var o...
")?e.substr(0,e.length-2):e}function f(e,t,i){var o=r.sep!==r.posix.sep?e.replace(S,r.sep):e,s=r.sep+o,a=i?function(e,i){return"string"!=typeof e||e!==o&&!n.endsWith(e,s)?null:t}:function(e,i){return"string"==typeof e&&e===o?t:null};return a.allPaths=[(i?"
s
javascript
syzoj/syzoj
static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
MIT
function n(e,t){for(var i=void 0,n=-1,o=0;o<e.length;o++){var r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));var s=_[r] ;void 0!==s?(-1!==n&&...
")?e.substr(0,e.length-2):e}function f(e,t,i){var o=r.sep!==r.posix.sep?e.replace(S,r.sep):e,s=r.sep+o,a=i?function(e,i){return"string"!=typeof e||e!==o&&!n.endsWith(e,s)?null:t}:function(e,i){return"string"==typeof e&&e===o?t:null};return a.allPaths=[(i?"
n
javascript
syzoj/syzoj
static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/monaco-editor/0.18.1/min/vs/editor/editor.main.js
MIT