Files
url_tracker_tool/node_modules/date-fns/fp/_lib/convertToFP.js
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

21 lines
553 B
JavaScript

"use strict";
exports.convertToFP = convertToFP;
/**
* Converts a function to a curried function that accepts arguments in reverse
* order.
*
* @param fn - The function to convert to FP
* @param arity - The arity of the function
* @param curriedArgs - The curried arguments
*
* @returns FP version of the function
*
* @private
*/
function convertToFP(fn, arity, curriedArgs = []) {
return curriedArgs.length >= arity
? fn(...curriedArgs.slice(0, arity).reverse())
: (...args) => convertToFP(fn, arity, curriedArgs.concat(args));
}