mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
We previously required the `define` to appear directly as an expression statement, but there are common patterns where this is not the case.
12 lines
424 B
JavaScript
12 lines
424 B
JavaScript
; (function (global, factory) {
|
|
typeof exports === 'object' && typeof module !== 'undefined' ?
|
|
module.exports = factory(require('./a'), require('./dir/b')) :
|
|
typeof define === 'function' && define.amd ?
|
|
define(['./a', './dir/b'], factory) :
|
|
global.mymodule = factory(global.a, global.dir.b)
|
|
}(this, function (a, b) {
|
|
return {
|
|
bar: a.foo,
|
|
foo: b.bar
|
|
};
|
|
})); |