mapOneOrManyArgs.js 285 B

123456789
  1. import { map } from "../operators/map";
  2. const { isArray } = Array;
  3. function callOrApply(fn, args) {
  4. return isArray(args) ? fn(...args) : fn(args);
  5. }
  6. export function mapOneOrManyArgs(fn) {
  7. return map(args => callOrApply(fn, args));
  8. }
  9. //# sourceMappingURL=mapOneOrManyArgs.js.map