registration
This commit is contained in:
@@ -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));
|
||||
@@ -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.
|
||||
2
frontend/style/node_modules/date-fns/fp/_lib/convertToFP.d.ts
generated
vendored
2
frontend/style/node_modules/date-fns/fp/_lib/convertToFP.d.ts
generated
vendored
@@ -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.
|
||||
|
||||
5
frontend/style/node_modules/date-fns/fp/_lib/convertToFP.js
generated
vendored
5
frontend/style/node_modules/date-fns/fp/_lib/convertToFP.js
generated
vendored
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user