Skip to content

Instantly share code, notes, and snippets.

@sergueyarellano
Created May 28, 2021 17:11
Show Gist options
  • Save sergueyarellano/ed507f397091191a5575e163e053534a to your computer and use it in GitHub Desktop.
Save sergueyarellano/ed507f397091191a5575e163e053534a to your computer and use it in GitHub Desktop.
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