Loading Modernizr (or other JavaScript libraries) for use in a plugin

wp_enqueue_script() utilizes the WP_Scripts class, which extends the WP_Dependencies class. If you checkout that class, you will see a bunch of arrays at the top. So you could actually loop through list of queued scripts like so:

global $wp_scripts; // If inside a function

foreach($wp_scripts->queue as $script) {
    // Do some tomfoolery here... ;)
}

Also, if you use wp_enqueue_script(), it won’t load the script more than one time. It actually checks to see if it’s been enqueued, so I think the above is moot anyway. Good to know either way.

References:

http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/functions.wp-scripts.php

http://core.trac.wordpress.org/browser/trunk/wp-includes/class.wp-dependencies.php

http://codex.wordpress.org/Function_Reference/wp_enqueue_script