Skip to content
Relude interop library for the fetch API
Reason Nix
Branch: master
Clone or download
mlms13 Merge pull request #6 from reazen/dependabot/npm_and_yarn/handlebars-…
…4.5.3

Bump handlebars from 4.1.2 to 4.5.3
Latest commit bf8dfe5 Dec 29, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Setup GitHub actions Dec 12, 2019
__tests__ Add CircleCI build and Jest (integration) test Jul 10, 2019
examples/demo Setup GitHub actions Dec 12, 2019
src Add basic file upload support Aug 27, 2019
.gitattributes .gitattributes Apr 27, 2019
.gitignore Setup GitHub actions Dec 12, 2019
LICENSE Initial commit Apr 27, 2019
README.md
bsconfig.json Add basic file upload support Aug 27, 2019
default.nix Initial attempt Apr 27, 2019
package-lock.json Bump handlebars from 4.1.2 to 4.5.3 Dec 29, 2019
package.json Setup GitHub actions Dec 12, 2019

README.md

relude-fetch

GitHub CI npm

Overview

Relude interop library for the Browser Fetch API. This can also be used in Node.js using a polyfill like isomorphic-fetch.

This library basically wraps the bs-fetch Bucklescript library to lift any publicly-exposed Js.Promise.t('a) values into Relude.IO.t('a, Js.Promise.error) values. Using IO rather than Promise makes error handling 100% more explicit, allows for better composability with other effect and error types, and unlocks the full power of monads!

Examples

See the tests for example usage.

Also see the demo for real-world usage, such as file uploads.

Developer info

Scripts

# Normal development scripts
> npm run clean
> npm run build
> npm run cleanbuild
> npm run test
> npm run cleantest
> npm run watch

# Run the demo project via parcel
> npm run demo

Publishing to npm

> npm version major|minor|patch
> git push origin --follow-tags
> git push upstream --follow-tags
> npm publish

NixOS

> nix-shell
%nix%> npm install
You can’t perform that action at this time.