npm.io
0.2.0 • Published 6 years ago

@byungi/p-class

Licence
MIT
Version
0.2.0
Deps
1
Size
2 kB
Vulns
0
Weekly
0
Stars
3

@byungi/p-class

A inheritable promise.

Why?

Alternatives on platforms that can not inherit the built-in promise.

Example

import PClass from '@byungi/p-class'

class CustomPromise extends PClass {
    constructor(executor){
        super(executor)
    }
}

const promise = new CustomPromise(/* ... */)

promise.then(() => /* ... */)

License

MIT

Keywords