AeThex-Engine-Core/services/auth-service/node_modules/pause/index.js
mrpiglr 190b6b2eab
Some checks are pending
Build AeThex Engine / build-windows (push) Waiting to run
Build AeThex Engine / build-linux (push) Waiting to run
Build AeThex Engine / build-macos (push) Waiting to run
Build AeThex Engine / create-release (push) Blocked by required conditions
Deploy Docsify Documentation / build (push) Waiting to run
Deploy Docsify Documentation / deploy (push) Blocked by required conditions
chore: sync local changes to Forgejo
2026-03-13 00:37:06 -07:00

29 lines
No EOL
595 B
JavaScript

module.exports = function(obj){
var onData
, onEnd
, events = [];
// buffer data
obj.on('data', onData = function(data, encoding){
events.push(['data', data, encoding]);
});
// buffer end
obj.on('end', onEnd = function(data, encoding){
events.push(['end', data, encoding]);
});
return {
end: function(){
obj.removeListener('data', onData);
obj.removeListener('end', onEnd);
},
resume: function(){
this.end();
for (var i = 0, len = events.length; i < len; ++i) {
obj.emit.apply(obj, events[i]);
}
}
};
};