test-action-debian-package/node_modules/ramda/es/internal/_curry1.js

19 lines
436 B
JavaScript
Raw Normal View History

2020-03-26 14:37:35 +00:00
import _isPlaceholder from "./_isPlaceholder.js";
/**
* Optimized internal one-arity curry function.
*
* @private
* @category Function
* @param {Function} fn The function to curry.
* @return {Function} The curried function.
*/
export default function _curry1(fn) {
return function f1(a) {
if (arguments.length === 0 || _isPlaceholder(a)) {
return f1;
} else {
return fn.apply(this, arguments);
}
};
}