Merge pull request #76 from jjuutila/amd-support

Add AMD export
This commit is contained in:
Eli Grey
2014-03-20 18:28:33 -04:00
+7 -1
View File
@@ -244,4 +244,10 @@ var saveAs = saveAs
// while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window
if (typeof module !== "undefined") module.exports = saveAs;
if (typeof module !== "undefined" && module !== null) {
module.exports = saveAs;
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
define([], function() {
return saveAs;
});
}