Skip to content

Instantly share code, notes, and snippets.

@justinobney
Created January 12, 2015 20:30
Show Gist options
  • Select an option

  • Save justinobney/16d099a36291a071e2b5 to your computer and use it in GitHub Desktop.

Select an option

Save justinobney/16d099a36291a071e2b5 to your computer and use it in GitHub Desktop.
JSON.stringify((function(){
return Object.keys(window).filter(function(key) {
try {
var versionInfo = getVersionInfo(key)
return versionInfo.version
} catch (e) {
return false
}
}).map(getVersionInfo)
function getVersionInfo(key) {
var obj = window[key]
var isObject = typeof obj == 'object';
var version = obj['version'] || obj['Version'] || obj['_version'];
return {
name: key,
version: version
}
}
})())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment