Socket
Socket
Sign inDemoInstall

babel-helper-remap-async-to-generator

Package Overview
Dependencies
Maintainers
6
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-remap-async-to-generator - npm Package Compare versions

Comparing version 6.5.0 to 6.6.0

18

lib/index.js

@@ -1,5 +0,5 @@

/* @flow */
"use strict";
var _Object$assign = require("babel-runtime/core-js/object/assign")["default"];
var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"];

@@ -23,4 +23,2 @@

/*:: import type { NodePath } from "babel-traverse";*/
var buildWrapper = _babelTemplate2["default"]("\n (function () {\n var ref = FUNCTION;\n return function (PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n");

@@ -44,3 +42,3 @@

function classOrObjectMethod(path /*: NodePath*/, callId /*: Object*/) {
function classOrObjectMethod(path, callId) {
var node = path.node;

@@ -56,3 +54,3 @@ var body = node.body;

function plainFunction(path /*: NodePath*/, callId /*: Object*/) {
function plainFunction(path, callId) {
var node = path.node;

@@ -68,2 +66,8 @@ var wrapper = buildWrapper;

node.generator = true;
// Either the wrapped generator is invoked with `.apply(this, arguments)` or it has no params,
// so it should capture `arguments`
if (node.shadow) {
// node.shadow may be `true` or an object
node.shadow = _Object$assign({}, node.shadow, { arguments: false });
}

@@ -116,3 +120,3 @@ var asyncFnId = node.id;

exports["default"] = function (path /*: NodePath*/, callId /*: Object*/) {
exports["default"] = function (path, callId) {
var node = path.node;

@@ -119,0 +123,0 @@ if (node.generator) return;

{
"name": "babel-helper-remap-async-to-generator",
"version": "6.5.0",
"version": "6.6.0",
"description": "",

@@ -10,7 +10,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator",

"babel-runtime": "^5.0.0",
"babel-template": "^6.3.13",
"babel-types": "^6.4.5",
"babel-traverse": "^6.4.5",
"babel-helper-function-name": "^6.3.13"
"babel-template": "^6.6.0",
"babel-types": "^6.6.0",
"babel-traverse": "^6.6.0",
"babel-helper-function-name": "^6.6.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc