Created
December 4, 2013 21:51
-
-
Save drewfish/7796239 to your computer and use it in GitHub Desktop.
polyfill registration for Intl.MessageFormatter strawman
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (root, factory) { | |
var MessageFormatter = factory(); | |
// register in -all- the module systems (at once) | |
if (typeof define === 'function' && define.amd) { | |
defined('IntlMessageFormatter', MessageFormatter); | |
} | |
if (typeof exports === 'object') { | |
module.exports = MessageFormatter; | |
} | |
if (root) { | |
root.IntlMessageFormatter = MessageFormatter; | |
} | |
})(typeof global !== 'undefined' ? global : this, function() { | |
"use strict"; | |
function MessageFormatter() { | |
... | |
} | |
... | |
return MessageFormatter; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should not use a name when calling define. AMD, just like ES6 and CJS will support anonymous modules.