Plato on Github
Report Home
src/traversing/var/dir.js
Maintainability
70.12
Lines of code
22
Difficulty
12.59
Estimated Errors
0.10
Function weight
By Complexity
By SLOC
define( [ "../../core" ], function( jQuery ) { "use strict"; return function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; } );