Comparing version 0.2.1 to 0.3.0
@@ -95,2 +95,8 @@ var _ = require('underscore') | ||
function remove(projectionName, state) { | ||
var key = keys(projectionName, state) | ||
, projection = getProjection(projectionName) | ||
delete projection[key] | ||
} | ||
function retrieveResult(projectionName, data, cb) { | ||
@@ -157,2 +163,3 @@ var dataLocation = projectionDataLocations[projectionName] | ||
module.exports.load = load | ||
module.exports.remove = remove | ||
module.exports.save = save | ||
@@ -159,0 +166,0 @@ module.exports.setProjectionDataLocation = setProjectionDataLocation |
@@ -61,2 +61,8 @@ var _ = require('underscore') | ||
function remove(projectionName, state) { | ||
var key = keys(projectionName, state) | ||
, projection = getProjection(projectionName) | ||
delete projection[key] | ||
} | ||
function resolveFilter(projection, filterFn) { | ||
@@ -81,2 +87,3 @@ return _.filter(projection, function(state, key) { | ||
module.exports.load = load | ||
module.exports.remove = remove | ||
module.exports.save = save | ||
@@ -83,0 +90,0 @@ module.exports.setDataLocation = function(dir) { |
@@ -21,4 +21,15 @@ var path = require('path') | ||
function executeHandler(projectionName, state) { | ||
var context = { | ||
join: join | ||
, remove: remove | ||
} | ||
function remove() { | ||
storage.remove(projectionName, state) | ||
} | ||
state = state || {} | ||
match.fn.call(join, state, eventData) | ||
match.fn.call(context, state, eventData) | ||
storage.save(projectionName, state, function(err) { | ||
@@ -25,0 +36,0 @@ if(err) console.log(err) |
@@ -32,3 +32,3 @@ { | ||
, "main": "./bjorling.js" | ||
, "version": "0.2.1" | ||
, "version": "0.3.0" | ||
} |
15045
449