Removing dependency on script-name

This commit is contained in:
Christoph Oberhofer
2015-03-13 20:07:23 +01:00
parent f7e1c9728c
commit 24ceb3480c
3 changed files with 46 additions and 48 deletions
+6 -10
View File
@@ -1,15 +1,11 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
//Allow using this built library as an AMD module
//in another project. That other project will only
//see this AMD call, not the internal modules in
//the closure below.
define([], factory);
} else if (typeof module !== 'undefined') {
module.exports = factory();
var factorySource = factory.toString();
if (typeof module !== 'undefined') {
module.exports = factory(factorySource);
} else {
//Browser globals case. Just assign the
//result to a property on the global.
root.Quagga = factory();
root.Quagga = factory(factorySource);
}
}(this, function () {
}(this, function (__factorySource__) {