Comparing version 1.2.3 to 1.3.0
@@ -45,10 +45,10 @@ "use strict"; | ||
}; | ||
monad.get = monad.g = function () { | ||
monad.fold = function () { | ||
return value; | ||
}; | ||
monad.chain = monad.c = monad.bind; | ||
monad.map = monad.m = function (func) { | ||
monad.chain = monad.bind; | ||
monad.map = function (func) { | ||
return unit(func(value)); | ||
}; | ||
monad.join = monad.j = function () { | ||
monad.join = function () { | ||
return monad.bind(idFunction); | ||
@@ -59,4 +59,4 @@ }; | ||
}; | ||
monad.run = monad.r = function (func) { | ||
run(value, func);return monad; | ||
monad.run = function (func) { | ||
return run(value, func), monad; | ||
}; | ||
@@ -110,9 +110,9 @@ | ||
}; | ||
monad.is = monad.i = function () { | ||
monad.is = function () { | ||
return !valueIsNone; | ||
}; | ||
monad.or = monad.o = function (orValue) { | ||
monad.or = function (orValue) { | ||
return valueIsNone ? orValue : value; | ||
}; | ||
monad.else = monad.e = function (orMonad) { | ||
monad.else = function (orMonad) { | ||
return valueIsNone ? orMonad : monad; | ||
@@ -128,3 +128,3 @@ }; | ||
monad.run = function (func) { | ||
(valueIsNone ? function () {} : run)(value, func);return monad; | ||
return (valueIsNone ? function () {} : run)(value, func), monad; | ||
}; | ||
@@ -131,0 +131,0 @@ }); |
{ | ||
"name": "liftjs", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"homepage": "https://github.com/atomable/lift.js/", | ||
@@ -5,0 +5,0 @@ "description": "lift.js is a compact monad opinionated javascript library", |
@@ -174,3 +174,3 @@ [![atomable](https://img.shields.io/badge/atomable.io--blue.svg)](http://atomable.io) | ||
### isNothing, alias: n | ||
### isNothing | ||
``` | ||
@@ -187,3 +187,3 @@ Maybe[A].isNothing[] : boolean | ||
### is, alias: i | ||
### is | ||
``` | ||
@@ -200,3 +200,3 @@ Maybe[A].is[] : boolean | ||
### or, alias: o | ||
### or | ||
``` | ||
@@ -210,3 +210,3 @@ Maybe[A].or[B] : A or B | ||
### else, alias; e | ||
### else | ||
``` | ||
@@ -213,0 +213,0 @@ Maybe[A].else[Monad[B]] : Maybe[A] or Monad[B] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100689