Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

p-forever

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-forever - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

35

index.d.ts

@@ -8,2 +8,32 @@ declare const pForever: {

@returns Fulfills when `fn` returns `pForever.end`, or rejects if any of the promises returned from `fn` rejects.
@example
```
import pForever = require('p-forever');
pForever(async i => {
i++;
if (i > 100) {
return pForever.end;
}
await createFixture(i);
return i;
}, 0);
// or
let i = 0;
pForever(async () => {
i++;
if (i > 100) {
return pForever.end;
}
await createFixture(i);
});
```
*/

@@ -26,4 +56,7 @@ <ValueType>(

readonly end: unique symbol;
// TODO: Remove this for the next major release
default: typeof pForever;
};
export default pForever;
export = pForever;

@@ -15,4 +15,5 @@ 'use strict';

module.exports = pForever;
// TODO: Remove this for the next major release
module.exports.default = pForever;
module.exports.end = symbolEnd;

8

package.json
{
"name": "p-forever",
"version": "2.0.0",
"version": "2.1.0",
"description": "Run promise-returning & async functions repeatedly until you end it",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -47,7 +47,7 @@ "files": [

"devDependencies": {
"ava": "^1.3.1",
"ava": "^1.4.1",
"delay": "^4.1.0",
"tsd-check": "^0.4.0",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}

@@ -22,3 +22,3 @@ # p-forever [![Build Status](https://travis-ci.org/sindresorhus/p-forever.svg?branch=master)](https://travis-ci.org/sindresorhus/p-forever)

pForever(i => {
pForever(async i => {
i++;

@@ -43,3 +43,3 @@

pForever(() => {
pForever(async () => {
i++;

@@ -46,0 +46,0 @@

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