:rewrite-polyfills

compiler optionsince v1.9.562Edit

Rewrite any ES6+ feature usage with Closure Library's polyfills. :language-in must be at least :es6. Defaults to false.

:rewrite-polyfills true

Details:

All supported polyfills listed below (from polyfills.txt):

Native symbol Native version Polyfill version Polyfill library
Array.from es6 es3 es6/array/from
Array.of es6 es3 es6/array/of
Array.prototype.copyWithin es6 es3 es6/array/copywithin
Array.prototype.entries es6 es3 es6/array/entries
Array.prototype.fill es6 es3 es6/array/fill
Array.prototype.find es6 es3 es6/array/find
Array.prototype.findIndex es6 es3 es6/array/findindex
Array.prototype.includes es7 es3 es6/array/includes
Array.prototype.keys es6 es3 es6/array/keys
Array.prototype.values es6 es3 es6/array/values
Map es6 es3 es6/map
Math.acosh es6 es3 es6/math/acosh
Math.asinh es6 es3 es6/math/asinh
Math.atanh es6 es3 es6/math/atanh
Math.cbrt es6 es3 es6/math/cbrt
Math.clz32 es6 es3 es6/math/clz32
Math.cosh es6 es3 es6/math/cosh
Math.expm1 es6 es3 es6/math/exp1m
Math.hypot es6 es3 es6/math/hypot
Math.imul es6 es3 es6/math/imul
Math.log10 es6 es3 es6/math/log10
Math.log1p es6 es3 es6/math/log1p
Math.log2 es6 es3 es6/math/log2
Math.sign es6 es3 es6/math/sign
Math.sinh es6 es3 es6/math/sinh
Math.tanh es6 es3 es6/math/tanh
Math.trunc es6 es3 es6/math/trunc
Number.EPSILON es6 es3 es6/number/constants
Number.MAX_SAFE_INTEGER es6 es3 es6/number/constants
Number.MIN_SAFE_INTEGER es6 es3 es6/number/constants
Number.isFinite es6 es3 es6/number/isfinite
Number.isInteger es6 es3 es6/number/isinteger
Number.isNaN es6 es3 es6/number/isnan
Number.isSafeInteger es6 es3 es6/number/issafeinteger
Object.assign es6 es3 es6/object/assign
Object.entries es8 es3 es6/object/entries
Object.getOwnPropertyDescriptors es8 es5 es6/object/getownpropertydescriptors
Object.getOwnPropertySymbols es6 es5 es6/object/getownpropertysymbols
Object.is es6 es3 es6/object/is
Object.setPrototypeOf es6 es5 es6/object/setprototypeof
Object.values es8 es3 es6/object/values
Promise es6 es3 es6/promise
Proxy es6 es6
Reflect.apply es6 es3 es6/reflect/apply
Reflect.construct es6 es3 es6/reflect/construct
Reflect.defineProperty es6 es5 es6/reflect/defineproperty
Reflect.deleteProperty es6 es3 es6/reflect/deleteproperty
Reflect.get es6 es5 es6/reflect/get
Reflect.getOwnPropertyDescriptor es6 es5 es6/reflect/getownpropertydescriptor
Reflect.getPrototypeOf es6 es5 es6/reflect/getprototypeof
Reflect.has es6 es3 es6/reflect/has
Reflect.isExtensible es6 es3 es6/reflect/isextensible
Reflect.ownKeys es6 es5 es6/reflect/ownkeys
Reflect.preventExtensions es6 es3 es6/reflect/preventextensions
Reflect.set es6 es5 es6/reflect/set
Reflect.setPrototypeOf es6 es5 es6/reflect/setprototypeof
Set es6 es3 es6/set
String.fromCodePoint es6 es3 es6/string/fromcodepoint
String.prototype.codePointAt es6 es3 es6/string/codepointat
String.prototype.endsWith es6 es3 es6/string/endswith
String.prototype.includes es6 es3 es6/string/includes
String.prototype.normalize es6 es6
String.prototype.padEnd es8 es3 es6/string/padend
String.prototype.padStart es8 es3 es6/string/padstart
String.prototype.repeat es6 es3 es6/string/repeat
String.prototype.startsWith es6 es3 es6/string/startswith
String.raw es6 es6
WeakMap es6 es3 es6/weakmap
WeakSet es6 es3 es6/weakset