Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Promises/A+ implementation. See https://github.com/promises-aplus/promises-spec.
###In the Node.js### You can install using Node Package Manager (npm):
npm install vow
###In the Browsers###
<script type="text/javascript" src="vow.min.js"></script>
Also RequireJS module format supported.
####Vow.promise()#### Create promise
var promise = Vow.promise();
###Promise API###
####fulfill(value)####
Fulfill promise with given value
promise.fulfill(value);
####reject(reason)####
Reject promise with given reason
promise.reject(error);
####isFulfilled()#### Returns whether the promise is fulfilled
promise.isFulfilled();
####isRejected()#### Returns whether the promise is rejected
promise.isRejected();
####isResolved()#### Returns whether the promise is fulfilled or rejected
promise.isResolved();
####then([onFulfilled], [onRejected])#### Arranges for:
onFulfilled
to be called with the value after promise is fulfilled,onRejected
to be called with the rejection reason after promise is rejected.Returns a new promise. See Promises/A+ specification for details.
promise.then(onFulfilled, onRejected);
####fail(onRejected)####
Arranges to call onRejected
on the promise's rejection reason if it is rejected.
####spread([onFulfilled], [onRejected])####
Like "then", but "spreads" the array into a variadic value handler.
###Vow API###
####isPromise(value)####
Returns whether the given value
is a promise.
####when(valueOrPromise, [onFulfilled], [onRejected])####
####isFulfilled(value)####
####isRejected(value)####
####isResolved(value)####
####fulfill(value)####
Returns a promise that has already been fulfilled with the given value
. If value
is a promise, returned promise will be fulfilled with fulfill/rejection value of given promise.
####reject(reason)####
Returns a promise that has already been rejected with the given reason
. If reason
is a promise, returned promise will be rejected with fulfill/rejection value of given promise.
####resolve(value)####
Returns a promise that has already been fulfilled with the given value
. If value
is a promise, returns promise
.
####all(promises)#### ####allResolved(promises)#### ####any(promises)#### ####timeout(promise, timeout)####
FAQs
DOM Promise and Promises/A+ implementation for Node.js and browsers
The npm package vow receives a total of 76,440 weekly downloads. As such, vow popularity was classified as popular.
We found that vow demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.