-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommonjsAdapter.js
More file actions
24 lines (19 loc) · 849 Bytes
/
commonjsAdapter.js
File metadata and controls
24 lines (19 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Defines a module that works in CommonJS and AMD.
// This version can be used as common boilerplate for a library module
// that you only want to expose to CommonJS and AMD loaders. It will not work
// well for defining browser globals.
// If you only want to target Node and AMD or a CommonJS environment that
// supports assignment to module.exports and you are not defining a module
// that has a circular dependency, see nodeAdapter.js
// Help Node out by setting up define.
if (typeof exports === 'object' && typeof define !== 'function') {
var define = function (factory) {
factory(require, exports, module);
};
}
define(function (require, exports, module) {
var b = require('b');
// Only attach properties to the exports object to define
// the module's properties.
exports.action = function () {};
});