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

react-services-injector

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

react-services-injector - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.idea/vcs.xml

34

index.js

@@ -14,12 +14,16 @@ class Injector {

if (method === 'constructor' || method.indexOf('get') === 0)
return;
return;
instance['__' + method] = instance[method];
instance['__' + method] = instance[method];
instance[method] = (...args) => {
instance['__' + method].apply(instance, args);
instance[method] = (...args) => {
instance['__' + method].apply(instance, args);
this.components.forEach(component => component.instance.forceUpdate());
this.components.forEach(component => component.instance.forceUpdate.call(component.instance));
};
});
instance.$update = () => {
this.components.forEach(component => component.instance.forceUpdate.call(component.instance));
};
});

@@ -57,3 +61,3 @@ return instance;

connect(component) {
let key = null;
var key = null;

@@ -63,5 +67,10 @@ class ConnectedComponent extends component {

super(props);
}
componentWillMount() {
key = injector.connectInstance(this);
this.services = Object.assign({}, injector.get());
key = injector.connectInstance(this);
if (super.componentWillMount)
super.componentWillMount();
}

@@ -75,6 +84,2 @@

}
static get name() {
return component.name;
}
}

@@ -89,6 +94,5 @@

if (typeof module !== 'undefined' && module.exports) {
module.exports = injector;
return;
module.exports = {injector};
} else {
exports.injector = injector;
}
}
{
"name": "react-services-injector",
"version": "0.0.1",
"version": "0.0.2",
"description": "A library to create and use sigleton-services in your React application.",

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

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