I'd suggest changing the following:
var pid = process && process.pid ? process.pid.toString(36) : '' ;
to:
var pid = typeof process !== 'undefined' && process.pid ? process.pid.toString(36) : '' ;
The 2nd version is more portable and safer. I pulled the uniqid module into an Angular 6 project and the code ended up running in strict mode, which caused a ReferenceError on 'process'.
I'd suggest changing the following:
var pid = process && process.pid ? process.pid.toString(36) : '' ;
to:var pid = typeof process !== 'undefined' && process.pid ? process.pid.toString(36) : '' ;
The 2nd version is more portable and safer. I pulled the uniqid module into an Angular 6 project and the code ended up running in strict mode, which caused a ReferenceError on 'process'.