ecmascript 6 - ES6 transpile the "species pattern" for old browsers -


i reading species pattern

having following code

 class myarray1 extends array {     static [symbol.species]() {         return array;     } } 

we can make methods slice return instance of array.

so if validate (new myarray1).slice() instanceof myarray1 false.

all till now.

but if want transpile code, let's babeljs; far know not work older browsers not have new implementation of slice method states

let arrayspeciescreate(o, count).

if true, can not transpile new feature, question is:

are there other solutions(polyfills, etc)? or feature can not used on older browsers if transpile code?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -