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 ES6 syntax #156

Merged
merged 1 commit into from
Apr 25, 2021
Merged

use ES6 syntax #156

merged 1 commit into from
Apr 25, 2021

Conversation

davidchambers
Copy link
Member

@davidchambers davidchambers requested a review from a team April 24, 2021 14:56

'use strict';

/* istanbul ignore if */
if (typeof __doctest !== 'undefined') {
/* eslint-disable no-unused-vars */
/* eslint-disable no-unused-vars, no-var */
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. I never thought to use var as a feature. :)

index.js Outdated
var functionName = has ('name', Function) ?
function functionName(f) { return f.name; } :
const functionName = (
has ('name', Function) ?
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need to consider the fallback for function names? Wasn't that an es5-support thing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

#142 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, and depending on the outcome of this #151 (comment) discussion, we may end up removing the functionName function altogether.

@davidchambers davidchambers merged commit fc81334 into master Apr 25, 2021
@davidchambers davidchambers deleted the davidchambers/es6 branch April 25, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants