nl_tokens: Figures out which seed to use from the list of available packages . Select by depth then by semver .
pl_tokens: function ( pkgDepths ) { // pkgDepths -> depth: [metas] var depths , minDepth , maxDepth , seeds ; depths = Object . keys ( pkgDepths ) ; minDepth = Math . min . apply ( Math , depths ) ; maxDepth = Math . max . apply ( Math , depths ) ; seeds = pkgDepths [ minDepth ] ; if ( 1 === seeds . length ) { if ( minDepth !== maxDepth ) { debug ( 'multiple "' + seeds [ 0 ] . name + '" packages found, using version ' + seeds [ 0 ] . version + ' from ' + seeds [ 0 ] . baseDirectory ) ; } return seeds [ 0 ] ; } seeds . sort ( function ( a , b ) { return libsemver . rcompare ( a . version , b . version ) ; } ) ; debug ( 'multiple "' + seeds [ 0 ] . <mask> + '" packages found, using version ' + seeds [ 0 ] . version + ' from ' + seeds [ 0 ] . baseDirectory ) ; return seeds [ 0 ] ; }