fjs.apply function to items

fjs.apply

fjs.apply is a special kind of fjs.map that applies a function available to all the items in the list and returns a new array with the results.

Usage

fjs.apply(functionName, items);

Basic example

var applyCase = fjs.apply("toUpperCase");
applyCase(["Hello", "World"]);
// => ["HELLO", "WORLD"]

Multiple argument example

var applyIndexOf = fjs.apply(["substring", "1", "4"]);
applyIndexOf(["Hello", "World"]);
// => ["ell", "orl"];