Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-object-rest-spread

Package Overview
Dependencies
Maintainers
6
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-object-rest-spread - npm Package Compare versions

Comparing version 6.6.5 to 6.8.0

50

lib/index.js

@@ -1,13 +0,28 @@

"use strict";
/*istanbul ignore next*/"use strict";
exports.__esModule = true;
exports["default"] = function (_ref) {
var t = _ref.types;
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
exports.default = function ( /*istanbul ignore next*/_ref) {
/*istanbul ignore next*/var t = _ref.types;
function hasSpread(node) {
var _arr = node.properties;
for ( /*istanbul ignore next*/var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
/*istanbul ignore next*/
var _ref2;
for (var _i = 0; _i < _arr.length; _i++) {
var prop = _arr[_i];
if (_isArray) {
if (_i >= _iterator.length) break;
_ref2 = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref2 = _i.value;
}
var prop = _ref2;
if (t.isSpreadProperty(prop)) {

@@ -23,3 +38,3 @@ return true;

visitor: {
visitor: { /*istanbul ignore next*/
ObjectExpression: function ObjectExpression(path, file) {

@@ -37,5 +52,17 @@ if (!hasSpread(path.node)) return;

var _arr2 = path.node.properties;
for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
var prop = _arr2[_i2];
for ( /*istanbul ignore next*/var _iterator2 = path.node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
/*istanbul ignore next*/
var _ref3;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref3 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref3 = _i2.value;
}
var prop = _ref3;
if (t.isSpreadProperty(prop)) {

@@ -61,2 +88,5 @@ push();

/*istanbul ignore next*/
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports["default"];

8

package.json
{
"name": "babel-plugin-transform-object-rest-spread",
"version": "6.6.5",
"version": "6.8.0",
"description": "Compile object rest and spread to ES5",

@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-object-rest-spread",

"dependencies": {
"babel-plugin-syntax-object-rest-spread": "^6.3.13",
"babel-runtime": "^5.0.0"
"babel-plugin-syntax-object-rest-spread": "^6.8.0",
"babel-runtime": "^6.0.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.3.13"
"babel-helper-plugin-test-runner": "^6.8.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