Socket
Socket
Sign inDemoInstall

relude-fetch

Package Overview
Dependencies
6
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    relude-fetch

Relude interop library for the fetch API


Version published
Weekly downloads
10
decreased by-67.74%
Maintainers
1
Install size
38.1 kB
Created
Weekly downloads
 

Readme

Source

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

Installation

Dependencies of this library are listed as peerDepenencies to avoid issues with multiple version errors with npm's installation methodology combined with BuckleScript.

> npm install --save bs-bastet relude bs-fetch relude-fetch

# Add bs-bastet, relude, bs-fetch, and relude-fetch to your bsconfig.json

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

FAQs

Last updated on 25 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc