Conditionizr: Detecting front-end environments and conditionally loading assets, wrapped inside a 1KB API
"Conditionizr (.NET Magazine's Open Source Project of the Year finalist) is a standalone JavaScript tool that detects front-end environments and returns an Object with boolean values on given test states. You can use Conditionizr with various public APIs to make your cross platform/device/browser development much easier and manageable. These APIs include adding your own tests, dynamic polyfills (eradicating conditional comments), callbacks for specific environment tests."