New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

findhit-evented

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

findhit-evented

javascript evented built on top of findhit-class

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

Evented test-badge

javascript chained event emitter based on findhit-class

Instalation


	npm install findhit-evented --save

Usage


var Evented = require('findhit-evented');

var events = new Evented();
events.on('test', function () { console.log( arguments ); });
events.fire( 'test', { hello: 'world' } );

// OR

var Socket = new Evented({

		initialize: function ( host, port ) {

			this.host = host;
			this.port = port;

		},

		connect: function () {
			var self = this;

			/*
				... some I/O
			*/

			this.fire( 'connecting' );

			// Maybe async?
				self.fire( 'connected' );

			return this;
		},

	});

var socket = new Socket( 'localhost', 123456 );

socket
	.on( 'connecting', function () {
		console.log( 'Trying to connect...' );
	})
	.once( 'connected', function () {
		console.log( 'YUPI' );
	})
	.connect();

Keywords

evented

FAQs

Package last updated on 13 Oct 2014

Did you know?

Socket

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.

Install

Related posts