Skip to content

Commit

Permalink
Added dependency to 'extend-it'
Browse files Browse the repository at this point in the history
  • Loading branch information
reicolina committed Aug 21, 2015
1 parent daca57f commit 9382346
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 3 additions & 7 deletions examples/flux-todomvc/js/stores/TodoStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var AppDispatcher = require('../dispatcher/AppDispatcher');
var FluxStore = require('flux/lib/FluxStore');
var TodoConstants = require('../constants/TodoConstants');
var assign = require('object-assign');
var extend = require('extend-it');

var _todos = {};

Expand Down Expand Up @@ -72,13 +73,8 @@ function destroyCompleted() {
}
}

// create a TodoStore subclass by doing classical inheritance
// see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
function TodoStore(dispatcher) {
FluxStore.call(this, dispatcher); // call super constructor.
}
TodoStore.prototype = Object.create(FluxStore.prototype);
TodoStore.prototype.constructor = TodoStore;
// create a TodoStore subclass
var TodoStore = extend(FluxStore);

/**
* Tests whether all the remaining TODO items are marked as completed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jest.dontMock('flux/lib/Dispatcher');
jest.dontMock('flux/lib/FluxStore');
jest.dontMock('../TodoStore');
jest.dontMock('object-assign');
jest.dontMock('extend-it');

describe('TodoStore', function() {

Expand Down
3 changes: 2 additions & 1 deletion examples/flux-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"flux": "^2.1.0",
"keymirror": "~0.1.0",
"object-assign": "^1.0.0",
"react": "^0.12.0"
"react": "^0.12.0",
"extend-it": "1.0.0"
},
"devDependencies": {
"browserify": "^6.2.0",
Expand Down

0 comments on commit 9382346

Please sign in to comment.