Is it possible to do Polyfill for Arrow function and Template String?

4

The functionality of Template String and Arrow Function are excellent for facilitating some operations in JavaScript. However, it seems that not all browsers still support it.

In many cases of lack of support of new functions, such as Object.assign , it is possible to make a Polyfill.

But what about Template String and Arrow Function? Would it be possible to do some Polyfill ?

I wonder why this is related to Language Syntax.

Would there be any way to use these two great features in versions of browsers that are not yet supported?

    
asked by anonymous 31.10.2018 / 17:59

1 answer

0

I recommend that you do not use Polyfills in this case, use Babel because it is not only a transpilador ES615 (ES2015) . The ECMA Standards Committee has agreed to release annual updates to the JavaScript language. Babel will always use the defaults, whereas we do not know if all browsers will, and if they can keep up with the changes.

Using a transpilador like Babel , you do not worry about browsers, about using new ECMAscript features when they are launched, rather than waiting for browser builders to integrate the resources or use polyfills .

    
08.11.2018 / 19:29