Skip to content

meta: callback checking is inconsistent across lib #3536

@MylesBorins

Description

@MylesBorins

Throughout the codebase there are two altering ways that callbacks are checked.

In some instances it is checked for truthyness

if (callback)
    process.nextTick(callback)

Where in others it is explicitly checked

if (typeof callback === 'function')
    process.nextTick(callback)

Hopefully this is not opening too large a bike shed, but I was curious if their is a legitimate benefit to using both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaIssues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions