1.1.1 • Published 7 years ago

kpromise v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

kPromise

kPromise is a wrapper library around JavaScript promises. It was written to conform to my personal preferences and whims for the projects I was working on at the time. Your mileage may vary extremely.

Getting Started

Published to NPM for ease. You know how it goes; first, just:

npm install --save kpromise

Just import and use the functions you want.

const k = require('kpromise');
const startWith = k.startWith;
const get = k.get;
const forEach = k.forEach;
const print = K.print;
//... and so on...

startWith([
    {name: "letters", contents: ["a","b"]},
    {name: "numbers", contents: ["1", "2"]}])
    .then(forEach(item =>
        startWith(item)
            .then(print(`Starting upload for ${item.name}`))
            .then(get('contents'))
            .then(forEach(upload))
            .then(print(`Completed upload for ${item.name}`))
    ))
;

Running the tests

Tests are written in jest and can be run via npm:

npm test

There's also a Wallaby config in the project for others who spend too much money on such things.

Versioning or lack thereof

I use SemVer for versioning, but I also don't pay too much attention to it, so tread carefully. For the versions available, see the releases page.

Who to blame

License

This project is licensed under the MIT License - see the LICENSE file for details

1.1.1

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago