Function.memo and Object.pick / omit at Stage 1 This Week

Jesse Warden - Jul 22 '22 - - Dev Community

2 ECMAScript proposals made it to Stage 1 this week:

If you're familiar with Lodash's memoize, it allows you cache a function call's return value so if you call it multiple times, it only has to actually run 1 time. Simplifies simple caching. They've added some more powerful caching options to the spec, but early days.

Object.pick / omit are simple lens functions (e.g. Lodash get/omit), but having built into a language who mainly deals with Objects is super powerful, especially for Functional Programmers using it with Promises or pipeline operators.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .