Browse Source

UMD foundation

Herbert Vojčík 9 years ago
parent
commit
b57cd360cd
1 changed files with 22 additions and 0 deletions
  1. 22 0
      queue.js

+ 22 - 0
queue.js

@@ -0,0 +1,22 @@
+// Uses Node, AMD or browser globals to create a module.
+
+(function (root, factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define([], factory);
+    } else if (typeof exports === 'object') {
+        // Node. Does not work with strict CommonJS, but
+        // only CommonJS-like environments that support module.exports,
+        // like Node.
+        module.exports = factory();
+    } else {
+        // Browser globals (root is window)
+        root.returnExports = factory();
+  }
+}(this, function () {
+
+    function Queue() {
+    }
+
+    return Queue;
+}));