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

inversify-hooks

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inversify-hooks - npm Package Compare versions

Comparing version 1.5.11 to 2.0.0-alpha1

.prettierrc.js

4

dist/index.d.ts

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

import { cid, container, Container, Inject, inject, injectable, mockInject, mockRequest, mockSingleton, mockTransient, resetContainer } from 'inversify-props';
import { cid, Container, getContainer, Inject, inject, injectable, mockRequest, mockSingleton, mockTransient, resetContainer, setContainer } from 'inversify-props';
declare function useInject<T>(id: string | symbol): [T];
export { useInject, container, Inject, inject, injectable, Container, cid, mockInject, resetContainer, mockRequest, mockSingleton, mockTransient };
export { useInject, Inject, inject, injectable, Container, cid, resetContainer, mockRequest, mockSingleton, mockTransient, setContainer, getContainer };

@@ -5,8 +5,7 @@ "use strict";

exports.cid = inversify_props_1.cid;
exports.container = inversify_props_1.container;
exports.Container = inversify_props_1.Container;
exports.getContainer = inversify_props_1.getContainer;
exports.Inject = inversify_props_1.Inject;
exports.inject = inversify_props_1.inject;
exports.injectable = inversify_props_1.injectable;
exports.mockInject = inversify_props_1.mockInject;
exports.mockRequest = inversify_props_1.mockRequest;

@@ -16,6 +15,7 @@ exports.mockSingleton = inversify_props_1.mockSingleton;

exports.resetContainer = inversify_props_1.resetContainer;
exports.setContainer = inversify_props_1.setContainer;
function useInject(id) {
return [inversify_props_1.container.get(id)];
return [inversify_props_1.getContainer().get(id)];
}
exports.useInject = useInject;
//# sourceMappingURL=index.js.map
{
"name": "inversify-hooks",
"version": "1.5.11",
"version": "2.0.0-alpha1",
"description": "Wrapper of inversify-props to inject your dependencies in the components, made with TypeScript using hooks.",

@@ -27,5 +27,5 @@ "main": "dist/index.js",

"@types/react": "^16.9.19",
"inversify-props": "^1.5.0",
"inversify-props": "^2.0.0",
"react": "^16.12.0"
}
}

@@ -1,8 +0,32 @@

import { cid, container, Container, Inject, inject, injectable, mockInject, mockRequest, mockSingleton, mockTransient, resetContainer } from 'inversify-props';
import {
cid,
Container,
getContainer,
Inject,
inject,
injectable,
mockRequest,
mockSingleton,
mockTransient,
resetContainer,
setContainer
} from 'inversify-props';
function useInject<T>(id: string | symbol): [T] {
return [container.get<T>(id)]
return [getContainer().get<T>(id)];
}
export { useInject, container, Inject, inject, injectable, Container, cid, mockInject, resetContainer, mockRequest, mockSingleton, mockTransient };
export {
useInject,
Inject,
inject,
injectable,
Container,
cid,
resetContainer,
mockRequest,
mockSingleton,
mockTransient,
setContainer,
getContainer
};

Sorry, the diff of this file is not supported yet

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