Socket
Socket
Sign inDemoInstall

babel-plugin-transform-es2015-shorthand-properties

Package Overview
Dependencies
Maintainers
6
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-shorthand-properties - npm Package Compare versions

Comparing version 6.8.0 to 6.18.0

19

lib/index.js

@@ -1,2 +0,2 @@

/*istanbul ignore next*/"use strict";
"use strict";

@@ -7,12 +7,15 @@ exports.__esModule = true;

return {
visitor: { /*istanbul ignore next*/
visitor: {
ObjectMethod: function ObjectMethod(path) {
/*istanbul ignore next*/var node = path.node;
var node = path.node;
if (node.kind === "method") {
path.replaceWith(t.objectProperty(node.key, t.functionExpression(null, node.params, node.body, node.generator, node.async), node.computed));
var func = t.functionExpression(null, node.params, node.body, node.generator, node.async);
func.returnType = node.returnType;
path.replaceWith(t.objectProperty(node.key, func, node.computed));
}
},
/*istanbul ignore next*/ObjectProperty: function ObjectProperty(_ref) {
/*istanbul ignore next*/var node = _ref.node;
ObjectProperty: function ObjectProperty(_ref) {
var node = _ref.node;

@@ -27,10 +30,8 @@ if (node.shorthand) {

var /*istanbul ignore next*/_babelTypes = require("babel-types");
var _babelTypes = require("babel-types");
/*istanbul ignore next*/
var t = _interopRequireWildcard(_babelTypes);
/*istanbul ignore next*/
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; } }
module.exports = exports["default"];
{
"name": "babel-plugin-transform-es2015-shorthand-properties",
"version": "6.8.0",
"version": "6.18.0",
"description": "Compile ES2015 shorthand properties to ES5",

@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-shorthand-properties",

"dependencies": {
"babel-types": "^6.8.0",
"babel-types": "^6.18.0",
"babel-runtime": "^6.0.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.8.0"
"babel-helper-plugin-test-runner": "^6.18.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