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

analyze

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analyze - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

lib/analyze/source/template-provider.js

4

lib/analyze/file-analyzer.js

@@ -9,2 +9,3 @@ var inherit = require('inherit');

var ObjectProvider = require('./source/object-provider');
var TemplateProvider = require('./source/template-provider');
var YMProvider = require('./module-providers/ym');

@@ -24,3 +25,4 @@

new InheritProvider(),
new ObjectProvider()
new ObjectProvider(),
new TemplateProvider()
];

@@ -27,0 +29,0 @@ this._moduleProviders = [

@@ -12,15 +12,2 @@ var JsClass = require('../../object-model/class');

var inheritMethodName = 'inherit';
// file.iterateNodesByType('CallExpression', function(node) {
// if (node.callee.type === 'Identifier' && node.callee.name === 'require') {
// if (node.arguments.length &&
// node.arguments[0].type === 'Literal' &&
// node.arguments[0].value === 'inherit'
// ) {
// var parent = node.parentNode;
// if (parent.type === 'VariableDeclarator') {
// inheritMethodName = parent.id.name;
// }
// }
// }
// });
if (inheritMethodName) {

@@ -27,0 +14,0 @@ file.iterateNodesByType('CallExpression', function(node) {

@@ -54,3 +54,3 @@ var vowFs = require('vow-fs');

} else {
if (filename.match(/^[a-z0-9_\-]+\.js$/g)) {
if (filename.match(/.js$/g) && !filename.match(/test.js$/g)) {
return vowFs.read(fullname, 'utf8').then(function (data) {

@@ -57,0 +57,0 @@ var analyzer = new Analyzer(fullname);

var JsClass = require('../object-model/class');
var JsObject = require('../object-model/object');
var JsFunction = require('../object-model/function');
var JsTemplate = require('../object-model/template');

@@ -78,6 +79,13 @@ module.exports = function (project) {

text += '}\n';
text += '\n';
text += '}\n\n';
} else if (moduleMember instanceof JsObject) {
text += dumpObject(moduleMember) + '\n';
} else if (moduleMember instanceof JsTemplate) {
text += 'template ' + moduleMember.getName() + ' {\n';
text += moduleMember.getArguments().map(
function (arg) {
return '\t' + (arg.type || '*') + ' ' + arg.name;
}
).join('\n');
text += '\n}\n\n';
} else if (moduleMember instanceof JsFunction) {

@@ -84,0 +92,0 @@ text += dumpFuncDecl(moduleMember, 0, false) + '\n';

{
"author": "Marat Dulin",
"name": "analyze",
"version": "0.0.8",
"version": "0.0.9",
"engines": {

@@ -6,0 +6,0 @@ "node": "0.10"

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