Skip to content

Don't extend the Promise prototype. #2

@leewz

Description

@leewz

One of the syntaxes adds a new method to Promise.prototype.

await-on/lib/await-on.js

Lines 27 to 30 in 7ff2223

//Promise type extension
global.Promise.prototype.handle = function() {
return on(this)
}

That is not recommended practice. It's worse when it's the default behavior of the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions