|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
382 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Creates a unary function that invokes `func` with its argument transformed.
|
|---|
| 3 | *
|
|---|
| 4 | * @private
|
|---|
| 5 | * @param {Function} func The function to wrap.
|
|---|
| 6 | * @param {Function} transform The argument transform.
|
|---|
| 7 | * @returns {Function} Returns the new function.
|
|---|
| 8 | */
|
|---|
| 9 | function overArg(func, transform) {
|
|---|
| 10 | return function(arg) {
|
|---|
| 11 | return func(transform(arg));
|
|---|
| 12 | };
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | module.exports = overArg;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.