UNPKG

963 BJavaScriptView Raw
1/* eslint sort-keys: "error" */
2// These mappings represent the syntax proposals that have been
3// shipped by browsers, and are enabled by the `shippedProposals` option.
4
5const proposalPlugins = {};
6
7// use intermediary object to enforce alphabetical key order
8const pluginSyntaxObject = {
9 "proposal-async-generator-functions": "syntax-async-generators",
10 "proposal-json-strings": "syntax-json-strings",
11 "proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
12 "proposal-object-rest-spread": "syntax-object-rest-spread",
13 "proposal-optional-catch-binding": "syntax-optional-catch-binding",
14 "proposal-optional-chaining": "syntax-optional-chaining",
15 "proposal-unicode-property-regex": null,
16};
17
18const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
19 return [key, pluginSyntaxObject[key]];
20});
21
22const pluginSyntaxMap = new Map(pluginSyntaxEntries);
23
24module.exports = { pluginSyntaxMap, proposalPlugins };