PHP 8.2.30
Preview: compose.js Size: 654 B
/home/byroehnu/easepay.easetack.com/node_modules/redux/src/compose.js

/**
 * Composes single-argument functions from right to left. The rightmost
 * function can take multiple arguments as it provides the signature for
 * the resulting composite function.
 *
 * @param {...Function} funcs The functions to compose.
 * @returns {Function} A function obtained by composing the argument functions
 * from right to left. For example, compose(f, g, h) is identical to doing
 * (...args) => f(g(h(...args))).
 */

export default function compose(...funcs) {
  if (funcs.length === 0) {
    return (arg) => arg
  }

  if (funcs.length === 1) {
    return funcs[0]
  }

  return funcs.reduce((a, b) => (...args) => a(b(...args)))
}

Directory Contents

Dirs: 1 × Files: 7

Name Size Perms Modified Actions
utils DIR
- drwxr-xr-x 2026-03-14 01:49:08
Edit Download
127 B lr--r--r-- 2026-03-14 01:49:08
Edit Download
1.33 KB lrw-r--r-- 2026-02-28 00:26:52
Edit Download
1.91 KB lrw-r--r-- 2026-02-28 00:27:02
Edit Download
5.91 KB lrw-r--r-- 2026-02-28 00:27:12
Edit Download
654 B lrw-r--r-- 2026-02-28 00:27:22
Edit Download
12.21 KB lrw-r--r-- 2026-02-28 00:27:32
Edit Download
455 B lrw-r--r-- 2026-02-28 00:27:44
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).