Skip to content

HLSiira/Aeon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Carbon - A compact library for component events.

License: MIT

About

Carbon is a compact library for allowing loose coupling of various components of the same application, built off of AmplifyJS. Weighing in at under 50 lines of code, Carbon provides a convenient interface for building an internal customizable API for an application. Carbon was modified in order to be used as a compact and intuitive library for development on the Atheos IDE, however it's proved so valuable as to become it's own mini library. From AmplifyJS:

AmplifyJS provides methods to facilitate the Publish and Subscribe messaging pattern in your front-end application. The idea is that someone is broadcasting one or more messages (publishing) and someone else is listening to one or more messages (subscribing). By separating your logic out like this it allows for loose coupling of your components, which results in less brittle and more reusable code. It is possible to implement the publish and subscribe model by using jQuery custom events, however, the AmplifyJS pub/sub component provides a slightly cleaner interface, prevents collisions between custom events and method names, and allows a priority to your messages.

Features

Pleasently Parsed: Carbon automatically tries to parse JSON replies.

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

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

Below is the typical structure for utilizing sending an Carbon:

carbon.subscribe('system.init', function(data) {
	// Initialize Component
});

carbon.publish('system.init', data);

About

A concise preload/transition navigation library.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project