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

homunculus

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homunculus - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

2

package.json
{
"name": "homunculus",
"version": "0.0.17",
"version": "0.0.18",
"description": "A lexer&parser by Javascript",

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

@@ -143,9 +143,10 @@ var Class = require('../../util/Class');

},
getVid: function(v) {
return this.vidsMap[v];
},
addVid: function(node) {
var v = node.token().content();
if(this.vidsMap.hasOwnProperty(v)) {
return;
}
this.vids.push(node);
this.vidsMap[v] = node;
this.vidsMap[v] = this.vidsMap[v] || [];
this.vidsMap[v].push(node);
return this;

@@ -152,0 +153,0 @@ },

@@ -120,2 +120,7 @@ var homunculus = require('../homunculus');

});
it('#getVid', function() {
var context = homunculus.getContext('js');
context.parse('a = 1');
expect(context.getVid('a')[0]).to.be(context.getVids()[0]);
});
it('return 1', function() {

@@ -173,5 +178,5 @@ var context = homunculus.getContext('js');

context.parse('a.b = 1;a = 2;');
expect(context.getVids().length).to.be(1);
expect(context.getVids().length).to.be(2);
});
});
});

Sorry, the diff of this file is not supported yet

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