Modernize codebase to ES2015+

Description

After dropping support for Node.js 4 (NODEJS-516), given that Node.js 6 supports 95%+ of the features in the spec, we can modernize the driver codebase by:

  • Using Object destructuring for require.

  • Use rest parameters.

  • Use spread syntax.

  • Migrate to class syntax to the few constructor and prototype declarations left, like Connection and ControlConnection, Protocol and Parser.

  • Use Array.prototype.includes()

  • ...

Environment

None

Pull Requests

None
Done

Assignee

Jorge Bay Gondra

Reporter

Jorge Bay Gondra

Reviewer

None

Fix versions

Labels

None

Components

None

PM Priority

None

Pull Request

None

Epic Link

Priority

Major