main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
455 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import flatten from './flatten.js';
|
---|
| 2 | import overRest from './_overRest.js';
|
---|
| 3 | import setToString from './_setToString.js';
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * A specialized version of `baseRest` which flattens the rest array.
|
---|
| 7 | *
|
---|
| 8 | * @private
|
---|
| 9 | * @param {Function} func The function to apply a rest parameter to.
|
---|
| 10 | * @returns {Function} Returns the new function.
|
---|
| 11 | */
|
---|
| 12 | function flatRest(func) {
|
---|
| 13 | return setToString(overRest(func, undefined, flatten), func + '');
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | export default flatRest;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.