@ebflat9/fp
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -0,1 +1,3 @@ | ||
import { Success, Failure } from './result.js' | ||
export function createClient( | ||
@@ -35,3 +37,7 @@ apiEndpoint, | ||
return { | ||
req: fetch(`${apiEndpoint}/${endpoint}`, config).then(isError).then(isJson), | ||
res: fetch(`${apiEndpoint}/${endpoint}`, config) | ||
.then(isError) | ||
.then(isJson) | ||
.then(Success.of) | ||
.catch(Failure.of), | ||
abort: controller.abort.bind(controller), | ||
@@ -38,0 +44,0 @@ } |
14
index.js
@@ -749,14 +749,2 @@ import { Maybe, Just, Nothing } from './maybe.js' | ||
export { | ||
Maybe, | ||
Just, | ||
Nothing, | ||
LazyCollection, | ||
Stack, | ||
Pair, | ||
Try, | ||
TryAsync, | ||
Result, | ||
Failure, | ||
Success, | ||
} | ||
export { Maybe, Just, Nothing, Try, TryAsync, Result, Failure, Success } |
{ | ||
"name": "@ebflat9/fp", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "my fp utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
36114
1288