Neurotoxin Powered Marketing

    owp.progress-promise

    1.0.3 • Public • Published

    OpenWebProject progress-promise

    Promise with support for progress updates

    Installation

    npm install owp.progress-promise --save
    

    Usage

    new ProgressPromise(function(resolve, reject, progress) { }) => Promise
    const ProgressPromise = require("owp.progress-promise");
    
    const promise = new ProgressPromise((resolve, reject, progress) => {
        progress("Running...");
    
        setTimeout(() => {
            resolve("Done");
        }, 1000);
    });
    
    promise.progress(progress => {
        console.log("Progress: " + progress);
    })
    .then(response => {
        console.log("Response: " + response);
    });

    Install

    npm i owp.progress-promise

    DownloadsWeekly Downloads

    5

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.83 kB

    Total Files

    4

    Last publish

    Collaborators

    • andreas_arvidsson