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

cheap-di-react

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheap-di-react - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

1

dist/index.d.ts

@@ -6,2 +6,3 @@ export * from './Context';

export * from './SelfProvider';
export * from './SingletonStateProvider';
export * from './use';

@@ -9,3 +9,4 @@ "use strict";

tslib_1.__exportStar(require("./SelfProvider"), exports);
tslib_1.__exportStar(require("./SingletonStateProvider"), exports);
tslib_1.__exportStar(require("./use"), exports);
//# sourceMappingURL=index.js.map

3

dist/SingletonImplementation.d.ts

@@ -5,5 +5,6 @@ import { Context as ReactContext } from 'react';

__key: any;
__updateKey: () => void;
__value: any;
__updateContext: () => void;
__configured: boolean;
__reactContext: ReactContext<string>;
};

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

if (constructor === null || constructor === void 0 ? void 0 : constructor.__singleton) {
constructor.__key = new Date().getTime();
constructor.__updateKey = () => {
constructor.__key = new Date().getTime();
const time = new Date().getTime();
constructor.__key = time;
constructor.__value = time;
constructor.__updateContext = () => {
constructor.__value = new Date().getTime();
rerender({});

@@ -58,7 +60,8 @@ };

}, [container.dependencies]);
return (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: singletonConstructors.reduce((Tree, constructor) => {
return (jsx_runtime_1.jsx(constructor.__reactContext.Provider, Object.assign({ value: constructor.__key.toString() }, { children: Tree }), constructor.__key.toString()));
}, jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: children }, void 0)) }, void 0));
const tree = singletonConstructors.reduce((Tree, constructor) => {
return (jsx_runtime_1.jsx(constructor.__reactContext.Provider, Object.assign({ value: constructor.__value.toString() }, { children: Tree }), constructor.__key.toString()));
}, jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: children }, void 0));
return tree;
};
exports.SingletonStateProvider = SingletonStateProvider;
//# sourceMappingURL=SingletonStateProvider.js.map
{
"name": "cheap-di-react",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

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