Noun/Pronoun Mix-up

    This package has been deprecated

    Author message:

    unsupported / joke / demo

    p-deferred

    1.0.0 • Public • Published

    p-deferred

    Simple module to create deferred objects:

    const defer = require('p-deferred');
    const deferred = defer();
    deferred.promise.then(
        (value)=>console.log('Resolved: ', value),
        (reason)=>console.error('Rejected: ', reason)
    );
    if(Math.random() > 0.5) {
        deferred.resolve("This is a success!")
    } else {
        deferred.reject("This is a failure!")
    }

    Install

    npm i p-deferred

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • pipobscure