Skip to content

Use newer class syntax #83

@Mr0grog

Description

@Mr0grog

ES6’s class syntax is supported by all the versions of Node.js that this package is compatible with, and using it would reduce some boilerplate and make the code a bit more readable.

This comes with a subtle behavior change that might be worth doing a major version bump for: you can’t call a class without the new keyword. That is, new BufferedMetricsLogger({ ... }) and BufferedMetricsLogger({ ... }) both work right now (although bad things will happen if you don’t use new), but with class syntax, BufferedMetricsLogger({ ... }) without the new keyword in front will throw an exception.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions