UNPKG

1.18 kBJavaScriptView Raw
1/*istanbul ignore next*/"use strict";
2
3exports.__esModule = true;
4exports.runtimeProperty = runtimeProperty;
5/*istanbul ignore next*/exports.isReference = isReference;
6
7var /*istanbul ignore next*/_babelTypes = require("babel-types");
8
9/*istanbul ignore next*/
10var t = _interopRequireWildcard(_babelTypes);
11
12/*istanbul ignore next*/
13function _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; } }
14
15function runtimeProperty(name) {
16 return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false);
17} /**
18 * Copyright (c) 2014, Facebook, Inc.
19 * All rights reserved.
20 *
21 * This source code is licensed under the BSD-style license found in the
22 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
23 * additional grant of patent rights can be found in the PATENTS file in
24 * the same directory.
25 */
26
27function isReference(path) {
28 return path.isReferenced() || path.parentPath.isAssignmentExpression({ left: path.node });
29}
\No newline at end of file