$14 GRAYBYTE WORDPRESS FILE MANAGER $36

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules.bundled/events/tests/

HOME
Current File : /opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules.bundled/events/tests//prepend.js
'use strict';

var common = require('./common');
var EventEmitter = require('../');
var assert = require('assert');

var myEE = new EventEmitter();
var m = 0;
// This one comes last.
myEE.on('foo', common.mustCall(function () {
  assert.strictEqual(m, 2);
}));

// This one comes second.
myEE.prependListener('foo', common.mustCall(function () {
  assert.strictEqual(m++, 1);
}));

// This one comes first.
myEE.prependOnceListener('foo',
                         common.mustCall(function () {
                           assert.strictEqual(m++, 0);
                         }));

myEE.emit('foo');

// Verify that the listener must be a function
assert.throws(function () {
  var ee = new EventEmitter();
  ee.prependOnceListener('foo', null);
}, 'TypeError: The "listener" argument must be of type Function. Received type object');


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
add-listeners.js
3.703 KB
6 Dec 2023 6.07 PM
root / root
0644
check-listener-leaks.js
3.38 KB
6 Dec 2023 6.07 PM
root / root
0644
common.js
3.129 KB
6 Dec 2023 6.07 PM
root / root
0644
errors.js
0.336 KB
6 Dec 2023 6.07 PM
root / root
0644
events-list.js
0.794 KB
6 Dec 2023 6.07 PM
root / root
0644
events-once.js
5.972 KB
6 Dec 2023 6.07 PM
root / root
0644
index.js
1.797 KB
6 Dec 2023 6.07 PM
root / root
0644
legacy-compat.js
0.289 KB
6 Dec 2023 6.07 PM
root / root
0644
listener-count.js
1.647 KB
6 Dec 2023 6.07 PM
root / root
0644
listeners-side-effects.js
2.053 KB
6 Dec 2023 6.07 PM
root / root
0644
listeners.js
5.209 KB
6 Dec 2023 6.07 PM
root / root
0644
max-listeners.js
2.02 KB
6 Dec 2023 6.07 PM
root / root
0644
method-names.js
1.626 KB
6 Dec 2023 6.07 PM
root / root
0644
modify-in-emit.js
3.149 KB
6 Dec 2023 6.07 PM
root / root
0644
num-args.js
2.165 KB
6 Dec 2023 6.07 PM
root / root
0644
once.js
2.586 KB
6 Dec 2023 6.07 PM
root / root
0644
prepend.js
0.813 KB
6 Dec 2023 6.07 PM
root / root
0644
remove-all-listeners.js
4.622 KB
6 Dec 2023 6.07 PM
root / root
0644
remove-listeners.js
6.442 KB
6 Dec 2023 6.07 PM
root / root
0644
set-max-listeners-side-effects.js
1.411 KB
6 Dec 2023 6.07 PM
root / root
0644
special-event-names.js
1.387 KB
6 Dec 2023 6.07 PM
root / root
0644
subclass.js
1.964 KB
6 Dec 2023 6.07 PM
root / root
0644
symbols.js
0.612 KB
6 Dec 2023 6.07 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF