File tree 2 files changed +10
-0
lines changed
src/com/google/javascript/jscomp/js
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 29
29
* @suppress {checkTypes|reportUnknownTypes}
30
30
*/
31
31
$jscomp . iteratorFromArray = function ( array , transform ) {
32
+ if ( $jscomp . ASSUME_ES6 ) {
33
+ return array [ Symbol . iterator ] ( ) ;
34
+ }
32
35
// NOTE: IE8 doesn't support indexing from boxed Strings.
33
36
if ( array instanceof String ) array = array + '' ;
34
37
var i = 0 ;
Original file line number Diff line number Diff line change 24
24
*/
25
25
$jscomp . ASSUME_ES5 = false ;
26
26
27
+ /**
28
+ * Whether to assume ES6 is available. This enables removing several
29
+ * internal polyfills, which must otherwise be detected at runtime.
30
+ * @define {boolean}
31
+ */
32
+ $jscomp . ASSUME_ES6 = false ;
33
+
27
34
/**
28
35
* Whether to skip the conformance check and simply use the polyfill always.
29
36
* @define {boolean}
You can’t perform that action at this time.
0 commit comments