Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

delorean

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delorean - npm Package Compare versions

Comparing version 0.0.2 to 0.8.5

.jscsrc

56

package.json
{
"name": "delorean",
"version": "0.0.2",
"description": "Modules, users and groups management",
"main": "lib/delorean.js",
"version": "0.8.5",
"description": "Flux Library",
"main": "src/delorean.js",
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec",
"test-watch": "node_modules/.bin/mocha --watch --reporter min",
"build": "node_modules/.bin/coffee --compile --bare --output lib src",
"build-watch": "node_modules/.bin/coffee --compile --bare --watch --output lib src",
"lint": "node_modules/.bin/coffeelint -f coffeelint.json src/*.coffee",
"doc": "node_modules/.bin/codo"
"test": "./node_modules/.bin/grunt karma"
},
"dependencies": {
"flux-capacitor": "*"
},
"author": "Fatih Kadir Akin",
"license": "MIT",
"devDependencies": {
"codo": "1",
"coffee-script": "1.3",
"mocha": "1",
"should": "1.1",
"coffeelint": "0.5"
"grunt": "^0.4.5",
"grunt-browserify": "^2.1.4",
"grunt-cli": "^0.1.13",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-docco": "^0.3.3",
"grunt-jscs-checker": "^0.6.2",
"grunt-karma": "^0.8.3",
"grunt-livereload": "^0.1.3",
"grunt-release": "git+https://github.com/f/grunt-release.git#c17216608469c5ecbb43458289763e09839932ba",
"grunt-requirejs": "^0.4.2",
"jasmine": "^2.0.1",
"karma": "^0.12.22",
"karma-chrome-launcher": "^0.1.4",
"karma-coverage": "^0.2.6",
"karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4"
},
"repository": {
"type": "git",
"url": "https://github.com/MacflyJS/delorean.git"
},
"author": "Krash Studio",
"contributors": [
"Michel Thiers <michel@kontestapp.com> (@michelthiers)",
"Paul Le Cam <paul@kontestapp.com> (@paul_lecam)"
],
"license": "MIT"
"dependencies": {
"es6-promise": "^1.0.0"
}
}

@@ -1,1 +0,178 @@

## Delorean
# DeLorean.js
[![Build Status](https://travis-ci.org/deloreanjs/delorean.svg?branch=master)](https://travis-ci.org/deloreanjs/delorean)
[![NPM version](https://badge.fury.io/js/delorean.js.svg)](http://badge.fury.io/js/delorean.js)
![Coverage](http://progressed.io/bar/84?title=coverage)
DeLorean is a tiny Flux pattern implementation.
- **Unidirectional data flow**, it makes your app logic **simpler than MVC**,
- Automatically listens to data changes and keeps your data updated,
- Makes data more **consistent** across your whole application,
- It's framework agnostic, completely. There's **no view framework dependency**.
- Very small, just **5K** gzipped.
- Built-in **React.js** integration, easy to use with **Flight.js** and **Ractive.js** and probably all others.
- Improve your UI/data consistency using **rollbacks**.
### Tutorial
You can learn Flux and DeLorean.js in minutes. [Read the tutorial](./docs/tutorial.md)
## Using with Frameworks
- [Try **React.js** example on JSFiddle](http://jsfiddle.net/fkadev/a2ms7rcc/)
- [Try **Flight.js** example on JSFiddle](http://jsfiddle.net/fkadev/1cw9Leau/)
- [Try **Ractive.js** example on JSFiddle](http://jsfiddle.net/PhilJ/2r1k2k90/2/)
---
## Install
You can install **DeLorean** with Bower:
```bash
bower install delorean
```
You can also install by NPM to use with **Browserify** *(recommended)*
```bash
npm install delorean.js
```
## Usage
Hipster way:
```js
var Flux = require('delorean.js').Flux;
// ...
```
Old-skool way:
```html
<script src="//rawgit.com/f/delorean/master/dist/delorean.min.js"></script>
<script>
var Flux = DeLorean.Flux;
// ...
</script>
```
## Overview
```javascript
/*
* 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();
/*
* Dispatchers 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());
};
```
[Run this example on JSFiddle](http://jsfiddle.net/fkadev/40cx3146/)
## Docs
You can read the [tutorial](./docs/tutorial.md) to get started
**DeLorean.js** with your favorite framework.
### Basic Concepts
- [**Store**: A postbox](./docs/stores.md)
- [**Dispatcher**: The postman, drops mail in the postboxes](./docs/dispatchers.md)
- [**View (or Component)**: Box owner, checks the box for mail](./docs/views.md)
- [**Action Creator**: The post office, manages postmen](./docs/actions.md)
Or you can visit [documents](./docs) page.
## Running the TodoMVC example
There is a simple TodoMVC example working with DeLorean.js
```bash
cd examples/todomvc
grunt
open index.html
```
## Authors
- Fatih Kadir Akin [@f](https://github.com/f)
- Burak Can [@burakcan](https://github.com/burakcan)
- Darcy Adams [@darcyadams](https://github.com/darcyadams)
## Contributors
- Quang Van [@quangv](https://github.com/quangv)
- James H. Edwards [@incrediblesound](https://github.com/incrediblesound)
- Fehmi Can Sağlam [@fehmicansaglam](https://github.com/fehmicansaglam)
- Serge van den Oever [@svdoever](https://github.com/svdoever)
- Markus Ast [@rkusa](https://github.com/rkusa)
## Contribution
```bash
git clone git@github.com:deloreanjs/delorean.git
cd delorean
git checkout -b your-feature-branch
```
After you make some changes and add your test cases to the `test/spec/*Spec.js`
files. please run:
```bash
grunt
grunt test
```
When it's all OK, [open a pull request](https://github.com/deloreanjs/delorean/compare/).
## License
[MIT License](http://f.mit-license.org)
## Name
The **flux capacitor** was the core component of Doctor Emmett Brown's **DeLorean time machine**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc