main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
557 bytes
|
Line | |
---|
1 | import identity from './identity.js';
|
---|
2 | import overRest from './_overRest.js';
|
---|
3 | import setToString from './_setToString.js';
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
---|
7 | *
|
---|
8 | * @private
|
---|
9 | * @param {Function} func The function to apply a rest parameter to.
|
---|
10 | * @param {number} [start=func.length-1] The start position of the rest parameter.
|
---|
11 | * @returns {Function} Returns the new function.
|
---|
12 | */
|
---|
13 | function baseRest(func, start) {
|
---|
14 | return setToString(overRest(func, start, identity), func + '');
|
---|
15 | }
|
---|
16 |
|
---|
17 | export default baseRest;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.