New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@teleology/fp

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teleology/fp - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

12

lib/retry.js

@@ -8,11 +8,15 @@ "use strict";

const retry = (fn, max = 3) => async (...args) => {
for (let i = max - 1; i > -1; i -= 1) {
/* eslint-disable no-await-in-loop */
const DEFAULT_ROLLOFF = async () => {};
const retry = (fn, max = 3, rolloff = DEFAULT_ROLLOFF) => async (...args) => {
for (let i = 0; i < max; i += 1) {
try {
// eslint-disable-next-line no-await-in-loop
return await fn(...args);
} catch (e) {
if (!i) {
if (i + 1 >= max) {
throw e;
}
await rolloff(i + 1);
}

@@ -19,0 +23,0 @@ }

{
"name": "@teleology/fp",
"version": "1.0.11",
"version": "1.0.12",
"description": "A small collection of functional programming utils",

@@ -5,0 +5,0 @@ "repository": "git@github.com:icarus-sullivan/teleology-fp.git",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc