Closed anandthakker closed 9 years ago
What would make sense for the version field? The user agent? Blank string? Maybe the module doing version match should be smarter?
Hmm. I'd probably favor a blank string, so as to avoid sloppy regex checks from accidentally matching anything. Certainly agree that it would be nice for the module to be smarter, but it seems like plenty of people could be assuming that process.version
is defined if they're targeting Node, so I still think it makes sense for this shim to be defensive about it.
A module that's using
process.version.match(...)
fails in the browser because there's noprocess.version
on the shim. See https://github.com/substack/node-browserify/issues/690.