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

p-lazy

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-lazy - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

12

index.js

@@ -18,2 +18,14 @@ 'use strict';

static resolve(value) {
return new PLazy(resolve => {
resolve(value);
});
}
static reject(error) {
return new PLazy((resolve, reject) => {
reject(error);
});
}
then(onFulfilled, onRejected) {

@@ -20,0 +32,0 @@ this._promise = this._promise || new Promise(this._executor);

2

package.json
{
"name": "p-lazy",
"version": "3.0.0",
"version": "3.1.0",
"description": "Create a lazy promise that defers execution until it's awaited or when `.then()` or `.catch()` is called",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,2 +0,2 @@

# p-lazy [![Build Status](https://travis-ci.org/sindresorhus/p-lazy.svg?branch=master)](https://travis-ci.org/sindresorhus/p-lazy)
# p-lazy

@@ -44,3 +44,11 @@ > Create a lazy promise that defers execution until it's awaited or when `.then()` or `.catch()` is called

### PLazy.resolve(value)
Create a `PLazy` promise that is resolved with the given `value`, or the promise passed as `value`.
### PLazy.reject(reason)
Create a `PLazy` promise that is rejected with the given `reason`.
## Related

@@ -47,0 +55,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