Page MenuHomePhabricator

[lib] Introduce `invertObjectToMap`
ClosedPublic

Authored by atul on Nov 2 2023, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 12:07 PM
Unknown Object (File)
Tue, Oct 1, 1:21 AM
Unknown Object (File)
Sat, Sep 14, 5:09 PM
Unknown Object (File)
Sat, Sep 7, 9:57 AM
Unknown Object (File)
Sat, Sep 7, 9:57 AM
Unknown Object (File)
Sat, Sep 7, 9:57 AM
Unknown Object (File)
Sep 2 2024, 3:54 PM
Unknown Object (File)
Aug 26 2024, 8:28 PM
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.