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

djinn-state

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djinn-state - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/Djinn.d.ts.map

7

dist/Djinn.d.ts

@@ -33,3 +33,7 @@ import { DjinnService } from './DjinnService';

getService: <T>(service: new () => T) => T;
remove(service: any): void;
/**
* Remove a registered service
* @param service The service class to be removed
*/
remove: (service: any) => void;
}

@@ -44,1 +48,2 @@ interface IDjinnServiceRegister {

export {};
//# sourceMappingURL=Djinn.d.ts.map

15

dist/Djinn.js

@@ -13,3 +13,3 @@ "use strict";

};
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
var DjinnService_1 = require("./DjinnService");

@@ -78,9 +78,14 @@ /**

};
/**
* Remove a registered service
* @param service The service class to be removed
*/
this.remove = function (service) {
var serviceName = service.name;
delete _this.__services[serviceName];
delete _this.__servicesSingletons[serviceName];
};
}
Djinn.prototype.remove = function (service) {
var serviceName = service.name;
delete this.__services[serviceName];
};
return Djinn;
}());
exports.Djinn = Djinn;

@@ -20,1 +20,2 @@ export declare class DjinnService {

export {};
//# sourceMappingURL=DjinnService.d.ts.map
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
var DjinnService = /** @class */ (function () {

@@ -17,3 +17,3 @@ function DjinnService() {

current: newState[key],
previous: _this.state[key]
previous: _this.state[key],
};

@@ -20,0 +20,0 @@ _this.state[key] = newState[key];

export { Djinn } from './Djinn';
export { DjinnService } from './DjinnService';
//# sourceMappingURL=index.d.ts.map
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
var Djinn_1 = require("./Djinn");

@@ -4,0 +4,0 @@ exports.Djinn = Djinn_1.Djinn;

{
"name": "djinn-state",
"version": "1.0.0",
"version": "1.0.1",
"description": "Powerful yet simple state machine",
"main": "dist/index.js",
"repository": "https://github.com/djinn-state/djinn-state.git",
"repository": "https://github.com/djinn-state/djinn-core.git",
"author": "Gilmar Quinelato <gilmarsquinelato@gmail.com>",
"license": "MIT",
"keywords": [
"javascript",
"typescript",
"nodejs",
"browser",
"application-state",
"state-management",
"services",
"djinn",
"@djinn"
],
"scripts": {

@@ -13,3 +24,3 @@ "test": "jest",

"build": "yarn build:ts",
"build:ts": "tsc --outDir ./dist -d ./src/index.ts",
"build:ts": "tsc -p tsconfig.json",
"test:send-coverage": "cat ./coverage/lcov.info | yarn codacy-coverage --language typescript"

@@ -16,0 +27,0 @@ },

@@ -26,5 +26,5 @@ # Djinn-state

npm ```npm i --save djinn-state```
npm `npm i --save djinn-state`
yarn ```yarn add djinn-state```
yarn `yarn add djinn-state`

@@ -31,0 +31,0 @@ ## Using

@@ -77,6 +77,11 @@ import { DjinnService } from './DjinnService';

remove(service: any) {
/**
* Remove a registered service
* @param service The service class to be removed
*/
remove = (service: any) => {
const serviceName = (<any>service).name;
delete this.__services[serviceName];
}
delete this.__servicesSingletons[serviceName];
};
}

@@ -83,0 +88,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