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

docs(reference): updates reference docs for 3.0.0 #1607

Merged
merged 2 commits into from
Dec 8, 2017

Conversation

daprahamian
Copy link
Contributor

Updating the "Reference" part of the reference docs for 3.0.0

@daprahamian daprahamian requested review from mbroadst and jlord December 7, 2017 16:35
Copy link
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments, looks pretty good otherwise!


ECMAScript Next (also know as ESNext, ES2015, ES6, and many other names) is the new future of the Javascript language. It introduces fundamental changes in JavaScript while maintaining backward compatibility with ECMAScript 5.

The MongoDB Node.js driver embraces the new JavaScript version to provide the end user with much improved functionality. We do this primarily by exposing Promises for all `async` methods without breaking backward compatibility with existing code using the driver.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reword this a little?

The MongoDB Node.js driver embraces modern JavaScript by optionally returning Promises from all async methods.

something like that?


The MongoDB Node.js driver embraces the new JavaScript version to provide the end user with much improved functionality. We do this primarily by exposing Promises for all `async` methods without breaking backward compatibility with existing code using the driver.

This section exposes how to use the MongoDB Node.js driver with ESNext6, leveraging all the productivity gains you get from the new Generators.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESNext6 wut?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also let's not talk about generators :)

var logger = Logger('A', options);
class A {
constructor() {
this.logger = Logger('A');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually required to be new Logger('A') (see: https://github.com/mongodb-js/mongodb-core/blob/3.0.0/lib/connection/logger.js#L25)

Copy link
Contributor

@jlord jlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto @mbroadst's comments and otherwise looks good 👍

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

Successfully merging this pull request may close these issues.

3 participants