Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use as NodeJS module #7

Open
leorossi opened this issue Feb 19, 2020 · 0 comments
Open

Use as NodeJS module #7

leorossi opened this issue Feb 19, 2020 · 0 comments

Comments

@leorossi
Copy link
Contributor

To speed up process while working on #5 I realized that this tool may be useful also to be used as node module rather than CLI only.

I spotted a couple of issues that may be worth working on

  • since UsedAssets is async, there is not way to know when Deadfile has finished his work, maybe extend EventEmitter and send events may be a solution?
  • reporting is enabled by default, this means logging in console, on a file and starting a reporting server which parses the file. This should be optional and results of Deadfile's work can be stored in a variable

I'd like to use it like

const instance = new Deadfile(opts);
instance.on('end', (results) => {
    console.log(results) // console.log(instance.results)
   // do your own stuff with results of deadfile
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant