Closed AlexNisnevich closed 7 years ago
Sorry for the slow review on this. I believe this will TypeError in browser environments where the process
global variable is defined but does not have a title
attribute.
Maybe something along the lines of
(typeof process === 'object') &&
(typeof process.versions === 'object') &&
(typeof process.versions.node !== 'undefined')
will meet your needs?
Ah yeah, that works!
Ok @qrohlf, the PR is ready for review again.
looks good, thanks for this
@AlexNisnevich these changes are now published on npm as v1.1.0
I'm working with a browser environment where the
process
global variable is defined. The Node check should be a little more specific to avoid false positives.