@visisoft/staticland
Advanced tools
Comparing version 0.1.29 to 0.1.30
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -183,3 +183,20 @@ 'use strict'; | ||
const | ||
cancelify = fn => semmelRamda.curryN(fn.length, (...args) => | ||
(res, rej) => { | ||
let | ||
resolveInner = res, | ||
rejectInner = rej; | ||
fn(...args).then(x => resolveInner(x), e => rejectInner(e)); | ||
return () => { | ||
resolveInner = () => undefined; | ||
rejectInner = () => undefined; | ||
}; | ||
} | ||
); | ||
exports.ap = ap; | ||
exports.cancelify = cancelify; | ||
exports.chain = chain; | ||
@@ -186,0 +203,0 @@ exports.fetchResponse = fetchResponse; |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -84,2 +84,3 @@ 'use strict'; | ||
exports.fromThrowable = fromThrowable; | ||
exports.isEither = isEither; | ||
exports.isLeft = isLeft; | ||
@@ -86,0 +87,0 @@ exports.isRight = isRight; |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -5,0 +5,0 @@ 'use strict'; |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -5,0 +5,0 @@ 'use strict'; |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -5,0 +5,0 @@ 'use strict'; |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -267,2 +267,3 @@ 'use strict'; | ||
// Btw. This is List.sequence(Promise.of, Promise.liftA2, [promises]) | ||
// :: [Promise e a] -> Promise e [a] | ||
@@ -269,0 +270,0 @@ all = promises => Promise.all(promises), |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -268,2 +268,3 @@ 'use strict'; | ||
// Btw. This is List.sequence(Promise.of, Promise.liftA2, [promises]) | ||
// :: [Promise e a] -> Promise e [a] | ||
@@ -590,2 +591,3 @@ all = promises => Promise.all(promises), | ||
fromThrowable: fromThrowable, | ||
isEither: isEither, | ||
isLeft: isLeft, | ||
@@ -592,0 +594,0 @@ isRight: isRight, |
/* @license Apache-2.0 | ||
@visisoft/staticland v.0.1.29 visisoft.de | ||
(Build date: 11/27/2021 - 7:10:29 PM) | ||
@visisoft/staticland v.0.1.30 visisoft.de | ||
(Build date: 12/1/2021 - 8:22:17 PM) | ||
*/ | ||
@@ -5,0 +5,0 @@ 'use strict'; |
@@ -22,1 +22,5 @@ export type Left = [any, any]; | ||
export function either<A, B, C>(onLeft: (c: C) => B): (onRight: (a: A) => B) => (m: Either<A>) => B; | ||
export function isEither(me: Either<any>): boolean; | ||
export function isRight(me: Either<any>): boolean; | ||
export function isLeft(me: Either<any>): boolean; |
import {Either} from './either'; | ||
import {Maybe} from "./maybe"; | ||
type Applicative<T> = Promise<T>|Either<T>|Maybe<T>; | ||
import {Cancelable} from "./cancelable"; | ||
type Applicative<T> = Cancelable<T>|Promise<T>|Either<T>|Maybe<T>; | ||
@@ -5,0 +6,0 @@ export function find<A>(predicate:(a: A) => boolean, list: Array<A>): Maybe<A>; |
@@ -100,3 +100,3 @@ { | ||
"type": "module", | ||
"version": "0.1.29" | ||
"version": "0.1.30" | ||
} |
@@ -1,2 +0,2 @@ | ||
[![Dependencies](https://img.shields.io/david/semmel/StaticLand.svg?style=flat-square)](https://david-dm.org/semmel/StaticLand) [![NPM Version](https://img.shields.io/npm/v/@visisoft/staticland.svg?style=flat-square)](https://www.npmjs.com/package/@visisoft/staticland) | ||
[![NPM Version](https://img.shields.io/npm/v/@visisoft/staticland.svg?style=flat-square)](https://www.npmjs.com/package/@visisoft/staticland) | ||
@@ -3,0 +3,0 @@ [@visisoft/staticland](https://semmel.github.io/StaticLand/) v{{ config.meta.version }} |
@@ -15,1 +15,2 @@ /** | ||
export {default as fetchResponse} from './cancelable/fetchResponseNodeJS.js'; | ||
export {default as cancelify} from './cancelable/cancelify.js'; |
@@ -22,1 +22,5 @@ export type Left = [any, any]; | ||
export function either<A, B, C>(onLeft: (c: C) => B): (onRight: (a: A) => B) => (m: Either<A>) => B; | ||
export function isEither(me: Either<any>): boolean; | ||
export function isRight(me: Either<any>): boolean; | ||
export function isLeft(me: Either<any>): boolean; |
@@ -71,5 +71,5 @@ /** | ||
export { | ||
alt, chain, either, fromAssertedValue, fromThrowable, isLeft, isRight, join, left, map, of | ||
alt, chain, either, fromAssertedValue, fromThrowable, isEither, isLeft, isRight, join, left, map, of | ||
}; | ||
export let right = of; |
import {Either} from './either'; | ||
import {Maybe} from "./maybe"; | ||
type Applicative<T> = Promise<T>|Either<T>|Maybe<T>; | ||
import {Cancelable} from "./cancelable"; | ||
type Applicative<T> = Cancelable<T>|Promise<T>|Either<T>|Maybe<T>; | ||
@@ -5,0 +6,0 @@ export function find<A>(predicate:(a: A) => boolean, list: Array<A>): Maybe<A>; |
@@ -167,2 +167,3 @@ /** | ||
// Btw. This is List.sequence(Promise.of, Promise.liftA2, [promises]) | ||
// :: [Promise e a] -> Promise e [a] | ||
@@ -169,0 +170,0 @@ all = promises => Promise.all(promises), |
148102
3815