Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
delorean.js
Advanced tools
DeLorean is a tiny Flux pattern implementation.
You can learn Flux and DeLorean.js in minutes. Read the tutorial
You can install DeLorean with Bower:
bower install delorean
You can also install by NPM to use with Browserify (recommended)
npm install delorean.js
Hipster way:
var Flux = require('delorean.js').Flux;
// ...
Old-skool way:
<script src="//rawgit.com/f/delorean/master/dist/delorean.min.js"></script>
<script>
var Flux = DeLorean.Flux;
// ...
</script>
/*
* Stores are simple data buckets which manages data.
*/
var Store = Flux.createStore({
data: null,
setData: function (data) {
this.data = data;
this.emit('change');
},
actions: {
'incoming-data': 'setData'
}
});
var store = new Store();
/*
* Dispatcher are simple action dispatchers for stores.
* Stores handle the related action.
*/
var Dispatcher = Flux.createDispatcher({
setData: function (data) {
this.dispatch('incoming-data', data);
},
getStores: function () {
return {increment: store};
}
});
/*
* Action Creators are simple controllers. They are simple functions.
* They talk to dispatchers. They are not required.
*/
var Actions = {
setData: function (data) {
Dispatcher.setData(data);
}
};
// The data cycle.
store.onChange(function () {
// End of data cycle.
document.getElementById('result').innerText = store.store.data;
});
document.getElementById('dataChanger').onclick = function () {
// Start data cycle:
Actions.setData(Math.random());
};
You can read the tutorial to learn how to start using DeLorean.js with your favorite framework.
Or you can visit documents page.
There is a simple TodoMVC example working with DeLorean.js
cd examples/todomvc
grunt
open index.html
The flux capacitor was the core component of Doctor Emmett Brown's time traveling DeLorean time machine
FAQs
Flux Library
We found that delorean.js 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.