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

es6-spread

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-spread - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

test/examples/this-member-call.js

2

bower.json
{
"name": "es6-spread",
"version": "0.0.3",
"version": "0.0.4",
"homepage": "https://github.com/square/es6-spread",

@@ -5,0 +5,0 @@ "authors": [

@@ -17,2 +17,4 @@ /* jshint node:true, undef:true, unused:true */

var ExpressionWithoutSideEffects = types.Type.or(n.Identifier, n.ThisExpression);
/**

@@ -33,3 +35,3 @@ * Visits a node of an AST looking for spread elements in arguments. This is

if (n.MemberExpression.check(callee)) {
if (n.Identifier.check(callee.object)) {
if (ExpressionWithoutSideEffects.check(callee.object)) {
// foo.bar(...a), safe to use `foo` as context

@@ -36,0 +38,0 @@ context = callee.object;

{
"name": "es6-spread",
"version": "0.0.3",
"version": "0.0.4",
"description": "ES6 spread compiled to ES5.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -12,7 +12,9 @@ /**

var es6spread = require('../lib');
var es6restParams = require('es6-rest-params');
var spread = require('../lib');
var restParams = require('es6-rest-params');
var fs = require('fs');
var path = require('path');
var assert = require('assert');
var RESULTS = 'test/results';

@@ -24,2 +26,6 @@

function normalize(source) {
return recast.prettyPrint(recast.parse(source, { esprima: esprima })).code;
}
require('example-runner').runCLI(process.argv.slice(2), {

@@ -34,3 +40,3 @@ transform: function(source, testName, filename) {

var ast = recast.parse(source, recastOptions);
ast = es6restParams.transform(es6spread.transform(ast));
ast = restParams.transform(spread.transform(ast));
var result = recast.print(ast, recastOptions);

@@ -41,3 +47,9 @@

return result.code;
},
context: {
assertSourceEquivalent: function(expected, actual) {
assert.equal(normalize('(' + expected + ')'), normalize('(' + actual + ')'));
}
}
});
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