New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

delorean.js

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delorean.js - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

bower.json
{
"name": "delorean.js",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "http://deloreanjs.com",

@@ -5,0 +5,0 @@ "authors": [

@@ -25,2 +25,7 @@ /** @jsx React.DOM */

}, 1000);
// Auto change
Array.observe(this.todos, function () {
self.emit('change');
});
},

@@ -58,2 +63,3 @@

]);
window.myTodos = myTodos;

@@ -60,0 +66,0 @@ /* Generate List dispatcher with TodoStore. */

@@ -25,2 +25,7 @@ /** @jsx React.DOM */

}, 1000);
// Auto change
Array.observe(this.todos, function () {
self.emit('change');
});
},

@@ -58,2 +63,3 @@

]);
window.myTodos = myTodos;

@@ -60,0 +66,0 @@ /* Generate List dispatcher with TodoStore. */

{
"name": "delorean.js",
"version": "0.3.0",
"version": "0.3.1",
"description": "Flux Library",

@@ -5,0 +5,0 @@ "main": "dist/delorean.min.js",

@@ -99,3 +99,3 @@ ![DeLorean Logo](https://raw.githubusercontent.com/f/delorean/master/asset/delorean-logo.png)

$.getJSON(url, function (data) {
$.getJSON(url, {}, function (data) {
self.todos = data.todos;

@@ -110,2 +110,34 @@ self.emit('change');

#### Using `Array.observe` and `Object.observe`
You don't have to call `emit('change')` everytime. You may use **`observe`** feature
of **ES.next**.
```javascript
var TodoStore = Flux.createStore({
todos: [
{text: 'hello'},
{text: 'world'}
],
initialize: function (url) {
var self = this;
// It will update store and Views everytime
// you changed the data.
Array.observe(this.todos, function () {
self.emit('change');
});
$.getJSON(url, {}, function (data) {
self.todos = data.todos;
// You don't have to emit 'change' event.
});
}
});
var myTodos = new TodoStore('/todos');
```
## Dispatcher

@@ -112,0 +144,0 @@

Sorry, the diff of this file is too big to display

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