Skip to content

HLSiira/Flux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flux - A simplistic (ES6) library for Event Delegation.

License: MIT

About

Flux is a compact library for creating individual event listeners while efficiently reducing processing overhead via Event Delegation, built off of Chris Ferdinandi's Events. Weighing in at under 150 lines of code, Flux was built in order to be used as a compact and intuitive Event Delegation library for development on the Atheos IDE, however it's proved so valuable as to become it's own mini library.

To learn more aboue Event Delegation, check out Chris' blog here

Features

Pleasently Parsed: Flux automatically tries to parse JSON replies.

Crazily Condensed: The minified version is less than ~1K, roughly 500b gzipped.

Easily Extensible: Flux is easily modifyable to meet your needs.

Below are the functions returned as an object when creating a new Flux refence.

fX('#selector'){
	exists: (s) => exists(s),
	list: () => list(s),
	off: (t, fn) => off(t, s, fn),
	on: (t, fn) => on(t, s, fn),
	once: (t, fn) => once(t, s, fn),
	reset: () => reset(s),
	trigger: (e, o) => trigger(s, e, o)
}

About

A simplistic library for event delegation

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project