Tests if an arbitrary value is a Maybe instance.
Tests if an arbitrary value is a Maybe instance.
const Maybe = require('folktale/maybe');
Maybe.hasInstance({ value: 1 });
// ==> false
Maybe.hasInstance(Maybe.Just(1));
// ==> true
hasInstance(value) {
return Boolean(value)
&& value[TYPE] === this[TYPE];
}