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

@ngxs-labs/emitter

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngxs-labs/emitter - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

136

bundles/ngxs-labs-emitter.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngxs/store'), require('rxjs/operators')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@ngxs/store', 'rxjs/operators'], factory) :
(factory((global['ngxs-labs'] = global['ngxs-labs'] || {}, global['ngxs-labs'].emitter = {}),global.ng.core,global.ngxs.store,global.rxjs.operators));
typeof define === 'function' && define.amd ? define('@ngxs-labs/emitter', ['exports', '@angular/core', '@ngxs/store', 'rxjs/operators'], factory) :
(factory((global['ngxs-labs'] = global['ngxs-labs'] || {}, global['ngxs-labs'].emitter = {}),global.ng.core,null,global.rxjs.operators));
}(this, (function (exports,core,store,operators) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
/**

@@ -121,3 +95,3 @@ * @fileoverview added by tsickle

*/
var InjectorAccessor = /** @class */ (function () {
var InjectorAccessor = (function () {
/**

@@ -137,8 +111,8 @@ * Creates InjectorAccessor instance

*/
function () {
if (!this.injector) {
throw new Error("You've forgotten to import `NgxsEmitPluginModule`");
}
return this.injector;
};
function () {
if (!this.injector) {
throw new Error("You've forgotten to import `NgxsEmitPluginModule`");
}
return this.injector;
};
/**

@@ -152,8 +126,36 @@ * Injector for accessing DI

/** @nocollapse */
InjectorAccessor.ctorParameters = function () { return [
{ type: core.Injector }
]; };
InjectorAccessor.ctorParameters = function () {
return [
{ type: core.Injector }
];
};
return InjectorAccessor;
}());
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p]; };
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
/**

@@ -167,3 +169,3 @@ * @fileoverview added by tsickle

*/
var EmitterAction = /** @class */ (function () {
var EmitterAction = (function () {
/**

@@ -188,3 +190,3 @@ * Creates EmitterAction instance

*/
var EmitStore = /** @class */ (function (_super) {
var EmitStore = (function (_super) {
__extends(EmitStore, _super);

@@ -204,16 +206,16 @@ function EmitStore() {

*/
function (receiver) {
var _this = this;
var /** @type {?} */ receiverEvent = receiver[RECEIVER_META_KEY];
if (!receiverEvent) {
throw new Error('Emitter methods should be decorated using @Emitter() decorator');
}
return {
emit: function (payload) {
EmitterAction.type = receiverEvent.type;
var /** @type {?} */ Action = receiverEvent.action ? receiverEvent.action : EmitterAction;
return _this.dispatch(new Action(payload));
function (receiver) {
var _this = this;
var /** @type {?} */ receiverEvent = receiver[RECEIVER_META_KEY];
if (!receiverEvent) {
throw new Error('Emitter methods should be decorated using @Emitter() decorator');
}
return {
emit: function (payload) {
EmitterAction.type = receiverEvent.type;
var /** @type {?} */ Action = receiverEvent.action ? receiverEvent.action : EmitterAction;
return _this.dispatch(new Action(payload));
}
};
};
};
EmitStore.decorators = [

@@ -250,3 +252,3 @@ { type: core.Injectable },

*/
var NgxsEmitPluginModule = /** @class */ (function () {
var NgxsEmitPluginModule = (function () {
function NgxsEmitPluginModule(injectorAccessor) {

@@ -261,7 +263,7 @@ this.injectorAccessor = injectorAccessor;

*/
function () {
return {
ngModule: NgxsEmitPluginModule
function () {
return {
ngModule: NgxsEmitPluginModule
};
};
};
NgxsEmitPluginModule.decorators = [

@@ -276,5 +278,7 @@ { type: core.NgModule, args: [{

/** @nocollapse */
NgxsEmitPluginModule.ctorParameters = function () { return [
{ type: InjectorAccessor, decorators: [{ type: core.Self }] }
]; };
NgxsEmitPluginModule.ctorParameters = function () {
return [
{ type: InjectorAccessor, decorators: [{ type: core.Self }] }
];
};
return NgxsEmitPluginModule;

@@ -378,2 +382,12 @@ }());

/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
exports.Emitter = Emitter;

@@ -394,1 +408,3 @@ exports.ofEmittableDispatched = ofEmittable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IsS0FBWSxFQUFFLE1BQW9CO1FBQzFELE9BQU8sVUFBQyxNQUFpQztZQUNyQyxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQ2RDLGdCQUFNLENBQUMsVUFBQyxHQUFrQjtnQkFDdEIscUJBQU0sY0FBYyxHQUFHLEtBQUssQ0FBQ0MsK0JBQXlCLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ3BFLHFCQUFNLDJCQUEyQixHQUFHLEdBQUcsQ0FBQyxNQUFNLEtBQUssTUFBTSxDQUFDO2dCQUMxRCxPQUFPLGNBQWMsSUFBSSwyQkFBMkIsQ0FBQzthQUN4RCxDQUFDLEVBQ0ZDLGFBQUcsQ0FBQyxVQUFDLEVBQWdDO29CQUE5QixrQkFBTSxFQUFFLGdCQUFLO2dCQUFzQixRQUFDO29CQUN2QyxJQUFJLEVBQUVELCtCQUF5QixDQUFDLE1BQU0sQ0FBQztvQkFDdkMsT0FBTyxFQUFFLE1BQU0sQ0FBQyxPQUFPO29CQUN2QixLQUFLLE9BQUE7aUJBQ1I7YUFBQyxDQUFDLENBQ04sQ0FBQztTQUNMLENBQUM7S0FDTDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
{
"name": "@ngxs-labs/emitter",
"version": "1.0.0",
"version": "1.0.1",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^6.0.0-rc.0 || ^6.0.0",

@@ -14,9 +14,6 @@ <p align="center">

## Concepts
Compare these diagrams, we've simplified Redux flow and threw out unnecessary middleware:
<kbd><img src="https://raw.githubusercontent.com/ngxs-labs/tools/master/docs/assets/redux-flow.png"></kbd>
![ER Flow](../../docs/assets/redux-er.png)
We've simplified this flow and threw out unnecessary mediators:
<kbd><img src="https://raw.githubusercontent.com/ngxs-labs/tools/master/docs/assets/er-flow.png"></kbd>
## :package: Install

@@ -23,0 +20,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