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
Post a Comment