Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
An universal JavaScript Emitter based on NodeJS EventEmitter.
$ npm install jvent
$ bower install jvent
Also, you can use the standalone version without components.
<script src="../dist/jvent.js"></script>
First, requires Jvent:
var Jvent = require('jvent');
Creates a new instance:
var emitter = new Jvent();
Now, defines a listener:
function listener(arg1, arg2) {
alert(arg1 + ' '+ arg2);
})
Then, adds a new event live with a listener:
emitter.on('live', listener);
Emitsthe event with some data:
emitter.emit('live', 'param1', 'param2');
Adds a listener
to the collection for a specified event
.
event
- The name of the event you want to add.listener
- Listener you want to add from given event.emitter.on('live', listener);
Adds a one time listener
to the collection for a specified event
. It will execute only once.
event
- The name of the event.listener
- Listener you want to add from the given event.emitter.once('live', listener);
Removes a listener
from the collection for a specified event
.
event
- The name of the event.listener
- Listener you want to remove from the given event.emitter.off('live', listener);
Removes all listeners
from the collection for a specified event
.
event
- The name of the event you want to remove.emitter.removeAllListeners('live');
Returns all listeners
from the collection for a specified event
.
event
- The name of the event.emitter.listeners('live');
Execute each of the listeners
collection in order with the given parameters.
All emitters emit the event newListener
when new listeners are added.
event
- The name of the event you want to emit.emitter.emit('live', 'data1', 'data2');
MIT license. Copyright © 2016 @pazguille.
FAQs
An universal JavaScript Emitter based on NodeJS EventEmitter.
The npm package jvent receives a total of 618 weekly downloads. As such, jvent popularity was classified as not popular.
We found that jvent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.