main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
771 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | /**
|
---|
7 | * Accepts a function with any arity and returns a function with arity of zero.
|
---|
8 | * The returned function ignores any arguments supplied to it.
|
---|
9 | *
|
---|
10 | * @func dropArgs
|
---|
11 | * @memberOf RA
|
---|
12 | * @since {@link https://char0n.github.io/ramda-adjunct/2.10.0|v2.10.0}
|
---|
13 | * @category Logic
|
---|
14 | * @sig (...a -> b)-> () -> b
|
---|
15 | * @param {Function} fn The function with any arity
|
---|
16 | * @return {Function} Returns function with arity of zero
|
---|
17 | * @see {@link http://ramdajs.com/docs/#nAry|R.nAry}
|
---|
18 | * @example
|
---|
19 | *
|
---|
20 | * const fn = (a = 1, b = 2) => a + b;
|
---|
21 | *
|
---|
22 | * RA.dropArgs(fn)('ignore1', 'ignore2'); //=> 3
|
---|
23 | */
|
---|
24 | var dropArgs = (0, _ramda.nAry)(0);
|
---|
25 | var _default = dropArgs;
|
---|
26 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.