Socket
Socket
Sign inDemoInstall

@arianee/utils

Package Overview
Dependencies
99
Maintainers
8
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @arianee/utils

This library contains various utilities that are used across the Arianee projects.


Version published
Weekly downloads
238
decreased by-47.35%
Maintainers
8
Created
Weekly downloads
 

Readme

Source

@arianee/utils

This library contains various utilities that are used across the Arianee projects.

cachedFetchLike

A wrapper for fetch like functions that caches the response for well-known arianee urls for a given time (default 1 hour, can be overridden by setting the options.timeToLive property, the cache map can also be passed with options.cache).

Usage:

// simplest usage
cachedFetchLike(fetch);

// can be composed with other fetch wrappers
cachedFetchLike(retryFetchLike(defaultFetchLike));

retryFetchLike

A wrapper for fetch that retry the request on failure.

Usage:

// simplest usage
retryFetchLike(fetch);

// can be composed with other fetch wrappers, retries can be passed as a second optional argument
retryFetchLike(defaultFetchLike, 2);

defaultFetchLike

A fetch like function that works in node and in the browser by selecting the appropriate implementation based on environment (node-fetch or DOM fetch).

Usage:

defaultFetchLike('https://google.com');

FAQs

Last updated on 11 Jun 2024

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