Closed xguest closed 8 years ago
Your version will break on a large number of browsers and node versions.
It's highly unlikely that this code can be improved, and highly unlikely that any potential improvement would be worth the risk of breakage. I've tested it extensively on many browsers and engines.
In addition, anything that relies on the constructor
property is unsafe, because that property is fully mutable.
I agree about the designer, but it is only an option they complement each other. Browsers that do not support the name of the function returns false, as false and TypedArray for these browsers. Typically, type checking to make choices, to use constructor functions Or I'm wrong? P.S. I'm surprised your performance. Thank you for your hard work
For one, IE 9 - 11 doesn't have the "name" property on functions, and IE 10 and 11 definitely have Typed Arrays.
Thanks! I will think? ;)
Hi! We have talked. I rewrote the code checked out, see. Propose changes to improve.
The steps have not been described. Your tests passed