执行过npm install命令的vue-element-admin源码
康凯
2022-05-20 aa4c235a8ca67ea8b731f90c951a465e92c0a865
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* exit-on-epipe.js (C) 2015-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*jshint eqnull:true, node:true */
var eoepipe = function eoepipeit(S/*:events$EventEmitter*/, bail/*:?()=>any*/) {
    if(!S || !S.on) return;
    if(!bail && typeof process !== 'undefined') bail = process.exit;
    var eoe = function eoeit(err/*:ErrnoError*/) {
        if(err.code === 'EPIPE' || err.errno === /*EPIPE*/32) { if(bail) bail(); else return; }
        var cnt = S.listenerCount ? S.listenerCount('error') : S.listeners('error').length;
        if(cnt == 1) {
            S.removeListener('error', eoe);
            S.emit('error', err);
            S.on('error', eoe);
        }
    };
    S.on('error', eoe);
};
 
if(typeof module !== 'undefined') module.exports = eoepipe;
if(typeof process !== 'undefined') eoepipe(process.stdout);