0.2.0 • Published 4 years ago

@byungi/p-class v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@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