Skip to content

Misleading readme example #8

@dansgithubuser

Description

@dansgithubuser

callback is always called
https://github.com/Tapppi/async-exit-hook/blame/80e692c88e62a88cf5750460ff02c28298e5b09b/readme.md#L60

callback is not always provided

// Cannot perform async hooks in `exit` event

should be

exitHook(callback => {
    setTimeout(() => {
        console.log('exiting 3');
        if(callback) callback();
    }, 1000);
});

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