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

rocambole

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rocambole - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

2

package.json
{
"name": "rocambole",
"version": "0.3.4",
"version": "0.3.5",
"description": "Recursively walk and transform EcmaScript AST",

@@ -5,0 +5,0 @@ "main": "rocambole.js",

@@ -230,2 +230,11 @@ # Rocambole [![Build Status](https://secure.travis-ci.org/millermedeiros/rocambole.png?branch=master)](https://travis-ci.org/millermedeiros/rocambole)

### v0.3.5 (2014/06/23)
- handle sparse arrays (eg. `[,]`). (#15)
### v0.3.4 (2014/06/23)
- only add `BlockComment.originalIndent` if `WhiteSpace` is on the start of
a line.
### v0.3.3 (2014/04/26)

@@ -232,0 +241,0 @@

@@ -78,2 +78,6 @@ /*jshint node:true */

var instrumentNodes = function(node, parent, prev, next){
// sparse arrays might have `null` elements, so we skip those for now
// see issue #15
if (!node) return false;
node.parent = parent;

@@ -80,0 +84,0 @@ node.prev = prev;

@@ -359,3 +359,16 @@ /*global describe:false, it:false, beforeEach:false */

describe('sparse array', function() {
// yes, people shold not be writting code like this, but we should not
// bail when that happens
it('should not fail on sparse arrays', function() {
var ast = rocambole.parse('[,3,[,4]]');
expect(ast.toString()).to.eql('[,3,[,4]]');
var elements = ast.body[0].expression.elements;
expect(elements[0]).to.be(null);
expect(elements[1].type).to.be('Literal');
expect(elements[1].value).to.be(3);
});
});
});
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