New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-test-utils

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-test-utils - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "ng-test-utils",
"version": "0.0.2",
"version": "0.0.3",
"description": "angular test utilities",

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

@@ -0,1 +1,3 @@

var hasAnnotation = require('../utils/hasAnnotation');
module.exports = createInjector();

@@ -10,5 +12,8 @@ module.exports.create = createInjector;

regexp = regexp || /^\s*@ngProvide\s*$/;
var needsInjection = require('./needsInjection').create(regexp, logger);
var buildInjection = require('./buildNgProvideHandler');
var collectVariableIdsAndInits = require('./collectVariableIdsAndInits');
var hasNgProvideAnnotation = hasAnnotation(regexp);

@@ -38,2 +43,16 @@ return addVariableInjections;

return false;
},
visitAssignmentExpression: function(path) {
var node = path.node;
var parent = path.parent, parentNode = parent && parent.node;
if(
parentNode &&
n.ExpressionStatement.check(parentNode) &&
hasNgProvideAnnotation(parentNode)
){
var injection = buildInjection([node.left], [node.right]);
injection.comments = parentNode.comments;
parent.replace(injection);
}
return false;
}

@@ -40,0 +59,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