lib/polymerize.js
function extractScripts($) {
  var scripts = [];
  $('script[src]').each(function() {
    var el  = $(this);
    var src = el.attr('src');
    if(ABS.test(src)) return;
    scripts.push(/^\./.test(src) ? src : './' + src);
    el.remove();
  })
  return scripts;
}
function extractScripts($) {
  var scripts = [];
  $('script[src]').each(function() {
    var el  = $(this);
    var src = el.attr('src');
    if(ABS.test(src)) return;
    scripts.push(/^\./.test(src) ? src : './' + src);
    el.remove();
  })
  return scripts;
}
function extractScripts ( $ ) { var scripts = [ ] ; $ ( 'script[src]' ) . each ( function ( ) { var el = $ ( this ) ; var src = el . attr ( 'src' ) ; if ( ABS . test ( src ) ) return ; scripts . push ( / ^\. / . test ( src ) ? src : './' + src ) ; el . remove ( ) ; } ) return scripts ; }
Extract relative path to other javascript sources

@param {Object} $
Whacko document

@return {Array}
Extract relative path to other javascript sources