Page MenuHomePhabricator

[lib] Introduce `invertObjectToMap`
ClosedPublic

Authored by atul on Nov 2 2023, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 8:54 PM
Unknown Object (File)
Sat, Nov 16, 8:54 PM
Unknown Object (File)
Sat, Nov 16, 8:54 PM
Unknown Object (File)
Sat, Nov 16, 8:54 PM
Unknown Object (File)
Sat, Nov 16, 8:53 PM
Unknown Object (File)
Oct 15 2024, 1:37 AM
Unknown Object (File)
Oct 15 2024, 1:37 AM
Unknown Object (File)
Oct 15 2024, 1:37 AM
Subscribers

Details

Summary

Context: https://linear.app/comm/issue/ENG-5640/consider-introducing-invertobjecttomap-utility-fn

Thanks @tomek for investigating + resolving the flow issues with this utility!

Test Plan

Consumed in minimally-encoded-thread-permissions, where the unit tests continue to succeed.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Nov 2 2023, 12:05 PM
ashoat added inline comments.
lib/utils/objects.js
132 ↗(On Diff #32639)

Let's mark the input as read-only so the caller doesn't have to worry about us mutating it

(Output is fine as-is though)

This revision is now accepted and ready to land.Nov 2 2023, 12:12 PM
This revision was landed with ongoing or failed builds.Nov 2 2023, 6:10 PM
This revision was automatically updated to reflect the committed changes.