Skip to content

rwhitmire/yip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yip.js - Domless Event Management

Build Status

API

on(name, function(params)): set up event

invoke(name, params): trigger event

clear(name): clear event(s)

Usage

basic example:

yip.on('myEvent', function(){
	console.log('myEvent called');		
});

yip.invoke('myEvent');

with parameters:

yip.on('myEvent', function(param){
	console.log(param);
});

yip.invoke('myEvent', 'foo');

namespacing:

yip.on('foo.bar', function(){
	console.log('bar called');
});

yip.on('foo.rab', function(){
	console.log('rab called');
});

yip.invoke('foo');

clearing events

yip.clear() // clears all events
yip.clear('foo') // clears all events named foo (or events in foo namespace)

Building

Running the following commands will build, execute tests, and deploy to a /build directory within the project root:

$ npm install
$ grunt

Continuous Testing

This project uses the Karma test runner. Karma allows us to easily run tests in any web browser and execute tests as files are updated.

$ npm install -g karma
$ karma start

About

Domless event management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published