The callback.
1.0.0
const callback = iteratee("foo"); // => (value) => get(value, "foo");
callback({ foo: "bar" }); // => "bar"
const callback = iteratee((foo: { bar: string }) => foo.bar); // => (foo: { bar: string }) => foo.bar;
callback({ bar: "baz" }); // => "baz"
Creates a function that invokes
fn
with the arguments of the created function. Iffn
is a property name, the created function returns the property value for a given element.