registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,3 +1,6 @@
"use strict";
exports.convertToFP = convertToFP;
/**
* Converts a function to a curried function that accepts arguments in reverse
* order.
@@ -10,7 +13,7 @@
*
* @private
*/
export function convertToFP(fn, arity, curriedArgs = []) {
function convertToFP(fn, arity, curriedArgs = []) {
return curriedArgs.length >= arity
? fn(...curriedArgs.slice(0, arity).reverse())
: (...args) => convertToFP(fn, arity, curriedArgs.concat(args));

View File

@@ -1,4 +1,4 @@
import type { FPArity, FPFn, FPFnInput } from "../types";
import type { FPArity, FPFn, FPFnInput } from "../types.js";
/**
* Converts a function to a curried function that accepts arguments in reverse
* order.

View File

@@ -1,4 +1,4 @@
import type { FPArity, FPFn, FPFnInput } from "../types";
import type { FPArity, FPFn, FPFnInput } from "../types.js";
/**
* Converts a function to a curried function that accepts arguments in reverse
* order.

View File

@@ -1,6 +1,3 @@
"use strict";
exports.convertToFP = convertToFP;
/**
* Converts a function to a curried function that accepts arguments in reverse
* order.
@@ -13,7 +10,7 @@ exports.convertToFP = convertToFP;
*
* @private
*/
function convertToFP(fn, arity, curriedArgs = []) {
export function convertToFP(fn, arity, curriedArgs = []) {
return curriedArgs.length >= arity
? fn(...curriedArgs.slice(0, arity).reverse())
: (...args) => convertToFP(fn, arity, curriedArgs.concat(args));