stefanpenner / es6-promise

A polyfill for ES6-style Promises
MIT License
7.3k stars 593 forks source link

[fixes #318] make sure PROMISE_ID actually works #320

Closed stefanpenner closed 6 years ago

majinliang123 commented 6 years ago

why not directly use Math.random().toString(36)

stefanpenner commented 6 years ago

why not directly use Math.random().toString(36)

I wanted to avoid the non alpha character in the property. In some engines, at-least in the past, these where treated less performantly. Although may no longer be the case, it comes at little cost so I opted to keep it.