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:
1.0 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports["default"] = void 0;
|
---|
| 5 | var _ramda = require("ramda");
|
---|
| 6 | /**
|
---|
| 7 | * Returns a new list containing the contents of the given list, followed by the given element.
|
---|
| 8 | * Like {@link http://ramdajs.com/docs/#append|R.append} but with argument order reversed.
|
---|
| 9 | *
|
---|
| 10 | * @func appendFlipped
|
---|
| 11 | * @memberOf RA
|
---|
| 12 | * @since {@link https://char0n.github.io/ramda-adjunct/2.5.0|v2.5.0}
|
---|
| 13 | * @category List
|
---|
| 14 | * @sig [a] -> a -> [a]
|
---|
| 15 | * @param {Array} list The list of elements to add a new item to
|
---|
| 16 | * @param {*} el The element to add to the end of the new list
|
---|
| 17 | * @return {Array} A new list containing the elements of the old list followed by `el`
|
---|
| 18 | * @see {@link http://ramdajs.com/docs/#append|R.append}
|
---|
| 19 | * @example
|
---|
| 20 | *
|
---|
| 21 | * RA.appendFlipped(['write', 'more'], 'tests'); //=> ['write', 'more', 'tests']
|
---|
| 22 | * RA.appendFlipped([], 'tests'); //=> ['tests']
|
---|
| 23 | * RA.appendFlipped(['write', 'more'], ['tests']); //=> ['write', 'more', ['tests']]
|
---|
| 24 | */
|
---|
| 25 | var appendFlipped = (0, _ramda.flip)(_ramda.append);
|
---|
| 26 | var _default = appendFlipped;
|
---|
| 27 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.