Skip to content

Instantly share code, notes, and snippets.

View fedemp's full-sized avatar
💭
That aloof guy

Federico Panico fedemp

💭
That aloof guy
  • Argentina
  • 06:05 (UTC -03:00)
View GitHub Profile
@pazguille
pazguille / exports.js
Last active October 11, 2015 21:38
Exports your library - support AMD / CommonJS
// @see http://addyosmani.com/writing-modular-js/
// library was previously defined
// AMD suppport
if (typeof window.define === 'function' && window.define.amd !== undefined) {
window.define('library', [], function () {
return library;
});
// CommonJS suppport
} else if (typeof module !== 'undefined' && module.exports !== undefined) {