/usr/lib/nodejs/event-emitter/all-off.js is in node-event-emitter 0.3.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 'use strict';
var value = require('es5-ext/object/valid-object')
, hasOwnProperty = Object.prototype.hasOwnProperty;
module.exports = function (emitter/*, type*/) {
var type = arguments[1], data;
value(emitter);
if (type !== undefined) {
data = hasOwnProperty.call(emitter, '__ee__') && emitter.__ee__;
if (!data) return;
if (data[type]) delete data[type];
return;
}
if (hasOwnProperty.call(emitter, '__ee__')) delete emitter.__ee__;
};
|