@visisoft/staticland
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -21,2 +21,4 @@ 'use strict'; | ||
empty = () => Promise.resolve(), | ||
/** | ||
@@ -185,2 +187,4 @@ * Note that `Promise.reject` rejects with any type including any Promise (unsettled, rejected or fulfilled)! | ||
let join = semmelRamda.identity; | ||
/** @deprecated */ | ||
let unit = empty; | ||
@@ -203,3 +207,5 @@ var promise = /*#__PURE__*/Object.freeze({ | ||
tapRegardless: tapRegardless, | ||
join: join | ||
empty: empty, | ||
join: join, | ||
unit: unit | ||
}); | ||
@@ -449,2 +455,8 @@ | ||
// key = String | ||
// keyMaybeToMaybeObj :: key -> {key: Maybe a, …} -> Maybe {key: a, …} | ||
keyMaybeToMaybeObj = semmelRamda.curry((keyName, obj) => | ||
maybe(nothing, semmelRamda.assoc(keyName, semmelRamda.__, obj), obj[keyName]) | ||
), | ||
// maybeOfPromiseToPromiseOfMaybe :: Maybe Promise e a -> Promise e Maybe a | ||
@@ -466,3 +478,4 @@ maybeOfPromiseToPromiseOfMaybe = maybe(semmelRamda.compose(of, nothing), map(of$1)), | ||
promiseToPromiseOfEither: promiseToPromiseOfEither, | ||
keyPromiseToPromiseCollection: keyPromiseToPromiseCollection | ||
keyPromiseToPromiseCollection: keyPromiseToPromiseCollection, | ||
keyMaybeToMaybeObj: keyMaybeToMaybeObj | ||
}); | ||
@@ -469,0 +482,0 @@ |
@@ -57,3 +57,3 @@ { | ||
"type": "module", | ||
"version": "0.1.7" | ||
"version": "0.1.8" | ||
} |
@@ -17,2 +17,4 @@ /** | ||
empty = () => Promise.resolve(), | ||
/** | ||
@@ -182,5 +184,7 @@ * Note that `Promise.reject` rejects with any type including any Promise (unsettled, rejected or fulfilled)! | ||
export { | ||
of, ap, bimap, chain, chainIf, chainTap, chainRej, coalesce, create, map, mapRej, reject, tap, tapRegardless | ||
of, ap, bimap, chain, chainIf, chainTap, chainRej, coalesce, create, map, mapRej, reject, tap, tapRegardless, empty | ||
}; | ||
export let join = identity; | ||
/** @deprecated */ | ||
export let unit = empty; |
@@ -27,2 +27,8 @@ /** | ||
// key = String | ||
// keyMaybeToMaybeObj :: key -> {key: Maybe a, …} -> Maybe {key: a, …} | ||
keyMaybeToMaybeObj = curry((keyName, obj) => | ||
maybe(nothing, assoc(keyName, __, obj), obj[keyName]) | ||
), | ||
// maybeOfPromiseToPromiseOfMaybe :: Maybe Promise e a -> Promise e Maybe a | ||
@@ -43,3 +49,4 @@ maybeOfPromiseToPromiseOfMaybe = maybe(compose(of_p, nothing), map_p(of_mb)), | ||
promiseToPromiseOfEither, | ||
keyPromiseToPromiseCollection | ||
keyPromiseToPromiseCollection, | ||
keyMaybeToMaybeObj | ||
}; |
44869
775