UNPKG

3.27 kBJavaScriptView Raw
1const es = {
2 "transform-template-literals": {
3 features: ["template literals"],
4 },
5 "transform-literals": {
6 features: ["Unicode code point escapes"],
7 },
8 "transform-function-name": {
9 features: ['function "name" property'],
10 },
11 "transform-arrow-functions": {
12 features: ["arrow functions"],
13 },
14 "transform-block-scoped-functions": {
15 features: ["block-level function declaration"],
16 },
17 "transform-classes": {
18 features: ["class", "super"],
19 },
20 "transform-object-super": {
21 features: ["super"],
22 },
23 "transform-shorthand-properties": {
24 features: ["object literal extensions / shorthand properties"],
25 },
26 "transform-duplicate-keys": {
27 features: ["miscellaneous / duplicate property names in strict mode"],
28 },
29 "transform-computed-properties": {
30 features: ["object literal extensions / computed properties"],
31 },
32 "transform-for-of": {
33 features: ["for..of loops"],
34 },
35 "transform-sticky-regex": {
36 features: [
37 'RegExp "y" and "u" flags / "y" flag, lastIndex',
38 'RegExp "y" and "u" flags / "y" flag',
39 ],
40 },
41
42 // We want to apply this prior to unicode regex so that "." and "u"
43 // are properly handled.
44 //
45 // Ref: https://github.com/babel/babel/pull/7065#issuecomment-395959112
46 "transform-dotall-regex": "s (dotAll) flag for regular expressions",
47
48 "transform-unicode-regex": {
49 features: [
50 'RegExp "y" and "u" flags / "u" flag, case folding',
51 'RegExp "y" and "u" flags / "u" flag, Unicode code point escapes',
52 'RegExp "y" and "u" flags / "u" flag, non-BMP Unicode characters',
53 'RegExp "y" and "u" flags / "u" flag',
54 ],
55 },
56
57 "transform-spread": {
58 features: "spread syntax for iterable objects",
59 },
60 "transform-parameters": {
61 features: [
62 "default function parameters",
63 "rest parameters",
64 "destructuring, parameters / defaults, arrow function",
65 ],
66 },
67 "transform-destructuring": {
68 features: [
69 "destructuring, assignment",
70 "destructuring, declarations",
71 ],
72 },
73 "transform-block-scoping": {
74 features: ["const", "let"],
75 },
76 "transform-typeof-symbol": {
77 features: ["Symbol / typeof support"],
78 },
79 "transform-new-target": {
80 features: ["new.target"],
81 },
82 "transform-regenerator": {
83 features: ["generators"],
84 },
85
86 "transform-exponentiation-operator": {
87 features: ["exponentiation (**) operator"],
88 },
89
90 "transform-async-to-generator": {
91 features: ["async functions"],
92 },
93
94 "proposal-async-generator-functions": "Asynchronous Iterators",
95 "proposal-object-rest-spread": "object rest/spread properties",
96 "proposal-unicode-property-regex": "RegExp Unicode Property Escapes",
97
98 "proposal-json-strings": "JSON superset",
99 "proposal-optional-catch-binding": "optional catch binding",
100 "transform-named-capturing-groups-regex": "RegExp named capture groups",
101 "transform-member-expression-literals": "Object/array literal extensions / Reserved words as property names",
102 "transform-property-literals": "Object/array literal extensions / Reserved words as property names",
103 "transform-reserved-words": "Miscellaneous / Unreserved words",
104};
105
106const proposals = require("./shipped-proposals").features;
107
108module.exports = Object.assign({}, es, proposals);