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

Remove Object.values() #1089

Merged
merged 1 commit into from Mar 31, 2018
Merged

Remove Object.values() #1089

merged 1 commit into from Mar 31, 2018

Conversation

jart
Copy link
Contributor

@jart jart commented Mar 31, 2018

According to https://caniuse.com/#search=object.value this does not work in IE
or Chrome <=49 which is 0.82% of the global population. The Closure Library can
solve this problem.

See also: https://stackoverflow.com/q/49355552/1653720

According to https://caniuse.com/#search=object.value this does not work in IE
or Chrome <=49 which is 0.82% of the global population. The Closure Library can
solve this problem.

See also: https://stackoverflow.com/q/49355552/1653720
@jart jart requested review from nfelt and chihuahua March 31, 2018 03:46
@@ -400,7 +401,7 @@ <h3>There’s no dashboard by the name of “<tt>[[_selectedDashboard]]</tt>.”
_dashboardData: {
type: Array,
readOnly: true,
value: Object.values(tf_tensorboard.dashboardRegistry),
value: goog.object.getValues(tf_tensorboard.dashboardRegistry),
Copy link
Member

Choose a reason for hiding this comment

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

We can actually just use lodash's _.values method and avoid an import.

That being said, I'm a fan of the Closure library in terms of the multi-browser support, security, and built-in constructs it offers. I'd be up for importing Closure if you think we can make good use of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can absolutely get value out of the Closure Library.

Lodash is actually blocking us from integrating a stack overflow fix in dagrejs/dagre#228 since the release came included with a Lodash surprise. There's maybe a dozen teams at Alphabet who use Lodash. So we're going to need to roll up our sleeves and use Rosie to migrate their codebases, before we can get the benefits of that fix.

@jart jart merged commit b8811a3 into tensorflow:master Mar 31, 2018
@jart jart deleted the object-values branch March 31, 2018 10:07
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.

None yet

2 participants