1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.callOrNothingAtAll = callOrNothingAtAll;
|
7 |
|
8 | function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
9 |
|
10 | function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
11 |
|
12 | function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
13 |
|
14 | function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | function callOrNothingAtAll(callback) {
|
27 | var argumentList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
28 |
|
29 | if (typeof callback === 'function') {
|
30 | return callback.apply(void 0, _toConsumableArray(typeof argumentList === 'function' ? argumentList() : argumentList));
|
31 | }
|
32 | } |
\ | No newline at end of file |