option-select-action
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -12,2 +12,3 @@ var slice = Array.prototype.slice | ||
select: select.bind(null, actions, value, opts), | ||
pop: pop.bind(null, value), | ||
toObject: toObject.bind(null, value), | ||
@@ -29,4 +30,8 @@ value: toObject.bind(null, value) | ||
function pop (value) { | ||
return value.pop() | ||
} | ||
function toObject (value) { | ||
return value | ||
} |
{ | ||
"name": "option-select-action", | ||
"description": "add an option object to a value array or call a fuction based on the object's properties", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "nrw/option-select-action" |
@@ -30,2 +30,5 @@ # option-select-action [![build status](https://secure.travis-ci.org/nrw/option-select-action.png)](http://travis-ci.org/nrw/option-select-action) | ||
assert.equal(i, 2) | ||
store.pop() | ||
assert.deepEqual(store.value(), []) | ||
``` |
@@ -27,2 +27,8 @@ var test = require('tape') | ||
t.equal(i, 2) | ||
t.same(store.pop(), {id: 'six'}) | ||
t.same(store.value(), [{}]) | ||
store.pop() | ||
t.same(store.value(), []) | ||
t.end() | ||
@@ -29,0 +35,0 @@ }) |
3399
81
34