Ben Newman 9acd33b93a Make buildExportAll generate pure ES5 code.
The untransformed `let` keyword causes problems for older parsers. I
understand using `let` instead of `var` ensures each getter function has
its own binding for the KEY variable, but the same can be accomplished
(with less code) using a `.forEach` callback function, and this way
there's no need to worry about generating a unique name for the `key`
variable.
2016-03-02 00:08:55 -05:00

18 lines
310 B
JavaScript

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mod = require('mod');
Object.keys(_mod).forEach(function (key) {
if (key === "default") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _mod[key];
}
});
});