Created
May 28, 2021 17:11
-
-
Save sergueyarellano/ed507f397091191a5575e163e053534a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = { | |
host: 'http://localhost:3010', | |
endpoint: 'data', | |
method: 'GET', | |
headers: { 'content-type': 'application/json' }, | |
contract: { | |
type: 'class', | |
description: 'report', | |
location: 'address', | |
distance: 'range' | |
}, | |
filters: [ | |
(element) => element.distance < 200 | |
] | |
} | |
const { result } = await pipe( | |
composeRequest, | |
makeRequest, | |
mapResponse, | |
filterResponse, | |
createResult | |
)(lift(config)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment