shipped-proposals.js 1.0 KB

123456789101112131415161718192021222324252627
  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. const proposalPlugins = {
  5. "proposal-numeric-separator": true
  6. };
  7. // use intermediary object to enforce alphabetical key order
  8. const 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-numeric-separator": "syntax-numeric-separator",
  13. "proposal-object-rest-spread": "syntax-object-rest-spread",
  14. "proposal-optional-catch-binding": "syntax-optional-catch-binding",
  15. "proposal-optional-chaining": "syntax-optional-chaining",
  16. "proposal-unicode-property-regex": null,
  17. };
  18. const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
  19. return [key, pluginSyntaxObject[key]];
  20. });
  21. const pluginSyntaxMap = new Map(pluginSyntaxEntries);
  22. module.exports = { pluginSyntaxMap, proposalPlugins };