Vow: the fastest promises

    I want to bring to your attention the Vow library , which was written by my colleague Dmitry Filatov dfilatov .

    The library implements Promises / A + , works very fast and requires a small amount of memory. According to performance tests, it is far ahead of Q , but at the same time it retains an asynchronous manner of work.

    Working with the Vow is as easy as working with the Q . Of the shortcomings (compared to Q ), we can only highlight the lack of progress .

    Sample code using Vow :
    function readFile(filename, encoding) {
        var promise = Vow.promise();
        fs.readFile(filename, encoding, function(err, data) {
            if (err) return promise.reject(err);
        return promise;
    Vow.all([readFile('test1.txt', 'utf8'), readFile('test2.txt', 'utf8')]).then(function(results) {

    A benchmark that reflects how Q is a slow library (testing the creation of sequential promises is tested):
    timeoperations per second

    Also, a library for working with the file system is implemented for Vow: vow-fs : https://github.com/dfilatov/vow-fs .

    NPM Package: vow
    Repository: https://github.com/dfilatov/jspromise

    Also popular now: