Skip to content

Instantly share code, notes, and snippets.

@tricknotes
Last active Aug 29, 2015
Embed
What would you like to do?
$ 6to5 source.js -m amd
// 6to5 source.js -m umd
(function (factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "module"], factory);
} else if (typeof exports !== "undefined" && typeof module !== "undefined") {
factory(exports, module);
}
})(function (exports, module) {
"use strict";
module.exports = function () {
return "hi";
};
});
// 6to5 source.js -m amd
define(["exports", "module"], function (exports, module) {
"use strict";
module.exports = function () {
return "hi";
};
});
export default function() {
return 'hi';
};
@tricknotes

This comment has been minimized.

Copy link
Owner Author

@tricknotes tricknotes commented Feb 6, 2015

$ 6to5 --version
3.3.12
$ 6to5 source.js -m amd > dest.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment