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

Minor optimization for handling blacklisted names #446

Merged
merged 1 commit into from Mar 1, 2017
Merged

Minor optimization for handling blacklisted names #446

merged 1 commit into from Mar 1, 2017

Conversation

hzlmn
Copy link
Contributor

@hzlmn hzlmn commented Feb 28, 2017

Currently if array passed as blacklist value in options, isBlacklist method always going through the list of props.

My version instead iterate over array once and create map structure with const value accessing time.

@@ -311,6 +308,19 @@ class Charset {
}
}

// convert value to Map object
function toMap(value) {
Copy link
Member

Choose a reason for hiding this comment

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

Since JS has a Map let's call this toObject

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@boopathi Updated

@boopathi boopathi added the Tag: Polish Pull Request for formatting, style changes, code cleanups, comments etc... label Mar 1, 2017
@boopathi boopathi merged commit 6d13e6b into babel:master Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tag: Polish Pull Request for formatting, style changes, code cleanups, comments etc...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants