flexdinesh / browser-or-node

Check where your code is running. In the browser or in node.js environment.
MIT License
245 stars 20 forks source link

Added `isDeno` #19

Closed ghost closed 3 years ago

ghost commented 3 years ago

I've added isDeno with basically this code right here:

const isDeno = typeof Deno !== 'undefined' && typeof Deno.core !== 'undefined';

I've also fixed several warnings my VSCode produced such as unused variables etc.

bzmw commented 3 years ago

This is a pretty great improvement, any chance we can merge and roll a new version @flexdinesh ?

flexdinesh commented 3 years ago

Thanks all - v2.0.0 released with isDeno support.

https://github.com/flexdinesh/browser-or-node/releases/tag/v2.0.0