|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
455 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | const iteratee = require('./iteratee.js');
|
|---|
| 6 |
|
|---|
| 7 | function over(...iteratees) {
|
|---|
| 8 | if (iteratees.length === 1 && Array.isArray(iteratees[0])) {
|
|---|
| 9 | iteratees = iteratees[0];
|
|---|
| 10 | }
|
|---|
| 11 | const funcs = iteratees.map(item => iteratee.iteratee(item));
|
|---|
| 12 | return function (...args) {
|
|---|
| 13 | return funcs.map(func => func.apply(this, args));
|
|---|
| 14 | };
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | exports.over = over;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.