node-datadog-metrics
node-datadog-metrics copied to clipboard
Only call `unref()` when it exists
Not all JavaScript environments have an .unref()
function on timers. This guards the one usage of .unref()
so as not to cause exceptions in environments that do not have it.
It solves the one issue explicitly called out in #43, but I didn’t actually do any testing with browsers, and don’t know if there might be other barriers to browser-based usage yet to be solved.