Replace lodash and underscore function functions with native JavaScript
MSALReplaces _.bind(fn, thisArg, ...args) with fn.bind(thisArg, ...args), and _.partial(fn, ...args) with fn.bind(null, ...args), which evaluates fn and args once, as _.partial does, where an arrow function would read them again on every call. Calls passing the placeholder _ are left alone, since bind cannot leave a slot open. A _.partial hands its receiver on to fn and a bound function does not, so it is rewritten only where fn is an arrow function, or a function declared in the file that reads neither this nor arguments.
org. openrewrite. javascript. migrate. lodash. LodashUnderscoreFunctionmod run . --recipe= org. openrewrite. javascript. migrate. lodash. LodashUnderscoreFunctionInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.