another-maybe
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "another-maybe", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Another maybe library which thinks it got it all.", | ||
@@ -11,3 +11,3 @@ "main": "src/index.js", | ||
"scripts": { | ||
"test": "mocha 'test/**/*.test.js'" | ||
"test": "./node_modules/.bin/mocha 'test/**/*.test.js'" | ||
}, | ||
@@ -14,0 +14,0 @@ "dependencies": {}, |
@@ -10,3 +10,3 @@ 'use strict'; | ||
isNothing: isNothing, | ||
is: (fn) => fn(value) ? maybeInterface : morph(), | ||
is: (fn) => !isNothing() && fn(value) ? maybeInterface : morph(), | ||
map: (fn) => isNothing() ? maybeInterface : morph(fn(value)), | ||
@@ -13,0 +13,0 @@ flatMap: (fn) => isNothing() ? null : fn(value), |
7171