Skip to content

Warn if no code is returned #10

@bahmutov

Description

@bahmutov

it should warn if the hook function does not return anything (can cause weird bugs)

const hook = require('node-hook')
function instrument(source, filename) {
  console.log('instrumenting %s for data-cover', filename)
  // returns undefined
}
hook.hook('.js', instrument)
process.on('exit', function () {
  console.log('data-cover is done')
  hook.unhook('.js')
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions