ysmood / yaku

A lightweight promise library
https://tonicdev.com/ysmood/yaku
MIT License
291 stars 28 forks source link

Support Web Workers #57

Closed boriskor closed 6 years ago

boriskor commented 6 years ago

Hi! While being run inside Web Worker in IE11, this library mistakenly detects it as Node environment, here: https://github.com/ysmood/yaku/blob/ee3c5c0d4a422eae4f9235e9be9728143da63b8f/src/yaku.core.js#L11 and here: https://github.com/ysmood/yaku/blob/ee3c5c0d4a422eae4f9235e9be9728143da63b8f/src/yaku.js#L11

It causes the code to crash on https://github.com/ysmood/yaku/blob/ee3c5c0d4a422eae4f9235e9be9728143da63b8f/src/yaku.js#L415

I've changed the code to support Web Workers =)

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 209d7e609ebe56233c44e7cb48e2acc55a4db13f on boriskor:worker-fix into ee3c5c0d4a422eae4f9235e9be9728143da63b8f on ysmood:master.

ysmood commented 6 years ago

Thanks a lot! New version yaku@0.18.6 published.

boriskor commented 6 years ago

Thanks for a quick response, you rock!