Projekt

Obecné

Profil

Stáhnout (843 Bajtů) Statistiky
| Větev: | Revize:
1 3a515b92 cagy
"use strict";
2
3
exports.__esModule = true;
4
5
exports.default = function (callee, thisNode, args) {
6
  if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { name: "arguments" })) {
7
    return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]);
8
  } else {
9
    return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode].concat(args));
10
  }
11
};
12
13
var _babelTypes = require("babel-types");
14
15
var t = _interopRequireWildcard(_babelTypes);
16
17
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
18
19
module.exports = exports["default"];