@brandingbrand/cargo-hold
Advanced tools
Comparing version 11.56.0 to 11.57.0
@@ -5,2 +5,12 @@ # Changelog | ||
# [11.57.0](https://github.com/brandingbrand/shipyard/compare/v11.56.0...v11.57.0) (2022-05-05) | ||
### Features | ||
* **cargo-hold:** add notOfType operator ([633da53](https://github.com/brandingbrand/shipyard/commit/633da53691a37bae7620ab0b661a2ffd404c6356)) | ||
* **cargo-hold:** return subscription from handler registration ([84d7477](https://github.com/brandingbrand/shipyard/commit/84d74777ca435a95b47308ad49d6a8275118e05d)) | ||
# [11.56.0](https://github.com/brandingbrand/shipyard/compare/v11.55.0...v11.56.0) (2022-05-02) | ||
@@ -7,0 +17,0 @@ |
@@ -27,2 +27,7 @@ import { pipe, branchObject, branch } from '@brandingbrand/standard-compose'; | ||
}; | ||
const notOfType = (...selectActions)=>{ | ||
return filter((action)=>selectActions.every((selectAction)=>selectAction.type !== action.type | ||
) | ||
); | ||
}; | ||
@@ -40,4 +45,6 @@ class ActionBus { | ||
this.registerHandler = (guard, handler)=>{ | ||
this.subscriptions.add(this._action$.pipe(filter((value)=>guard(value) | ||
)).subscribe(handler)); | ||
const subscription = this._action$.pipe(filter((value)=>guard(value) | ||
)).subscribe(handler); | ||
this.subscriptions.add(subscription); | ||
return subscription; | ||
}; | ||
@@ -967,2 +974,2 @@ this.dispose = ()=>{ | ||
export { ActionBus, EMPTY_ENTITY_STATE, Store, and, asyncBuilder, asyncBuilderWithStructureLens, buildActionCreators, buildAsyncEffect, buildAsyncEffectWithLens, buildCombinedLensedReducers, buildCombinedReducers, buildFailActionCreator, buildFailureActionReducer, buildFailureStateReducer, buildInitActionCreator, buildInitActionReducer, buildInitStateReducer, buildLoadingActionCreator, buildLoadingActionReducer, buildLoadingMoreActionCreator, buildLoadingMoreActionReducer, buildLoadingMoreStateReducer, buildLoadingStateReducer, buildPayloadLens, buildRevertActionCreator, buildRevertActionReducer, buildRevertStateReducer, buildSelectFailure, buildSelectPayload, buildSelectStatus, buildSucceedActionCreator, buildSuccessActionReducer, buildSuccessStateReducer, combineActionReducers, combineEffects, composeStateReducers, createActionCreator, createAsyncActionCreators, createAsyncAdaptor, createCombinedReducer, createEntityAdaptor, createFailureState, createIdleState, createLensedReducers, createLoadingMoreState, createLoadingState, createReducers, createSelectors, createSuccessState, defaultIdSelector, fromEntityArray, getSelectors, isSubtype, isType, makeAddMany, makeAddOne, makeAsyncEffect, makeCreateState, makeReducers, makeRemoveAll, makeRemoveMany, makeRemoveOne, makeSelectAll, makeSelectById, makeSelectByIds, makeSelectByIndex, makeSelectByIndices, makeSelectFailure, makeSelectPayload, makeSelectStatus, makeSetAll, makeSetMany, makeSetOne, matches, ofType, on, optionalSource, or, requireSource, sortIfNeeded, withActionKey, withAsyncCallback, withEnableLoadingMore, withMapOnFailure, withMapOnSuccess, withMetadata, withOptimisticUpdate, withStructureLens, withTriggerActionFilter }; | ||
export { ActionBus, EMPTY_ENTITY_STATE, Store, and, asyncBuilder, asyncBuilderWithStructureLens, buildActionCreators, buildAsyncEffect, buildAsyncEffectWithLens, buildCombinedLensedReducers, buildCombinedReducers, buildFailActionCreator, buildFailureActionReducer, buildFailureStateReducer, buildInitActionCreator, buildInitActionReducer, buildInitStateReducer, buildLoadingActionCreator, buildLoadingActionReducer, buildLoadingMoreActionCreator, buildLoadingMoreActionReducer, buildLoadingMoreStateReducer, buildLoadingStateReducer, buildPayloadLens, buildRevertActionCreator, buildRevertActionReducer, buildRevertStateReducer, buildSelectFailure, buildSelectPayload, buildSelectStatus, buildSucceedActionCreator, buildSuccessActionReducer, buildSuccessStateReducer, combineActionReducers, combineEffects, composeStateReducers, createActionCreator, createAsyncActionCreators, createAsyncAdaptor, createCombinedReducer, createEntityAdaptor, createFailureState, createIdleState, createLensedReducers, createLoadingMoreState, createLoadingState, createReducers, createSelectors, createSuccessState, defaultIdSelector, fromEntityArray, getSelectors, isSubtype, isType, makeAddMany, makeAddOne, makeAsyncEffect, makeCreateState, makeReducers, makeRemoveAll, makeRemoveMany, makeRemoveOne, makeSelectAll, makeSelectById, makeSelectByIds, makeSelectByIndex, makeSelectByIndices, makeSelectFailure, makeSelectPayload, makeSelectStatus, makeSetAll, makeSetMany, makeSetOne, matches, notOfType, ofType, on, optionalSource, or, requireSource, sortIfNeeded, withActionKey, withAsyncCallback, withEnableLoadingMore, withMapOnFailure, withMapOnSuccess, withMetadata, withOptimisticUpdate, withStructureLens, withTriggerActionFilter }; |
12
index.js
@@ -35,2 +35,7 @@ 'use strict'; | ||
}; | ||
const notOfType = (...selectActions)=>{ | ||
return operators.filter((action)=>selectActions.every((selectAction)=>selectAction.type !== action.type | ||
) | ||
); | ||
}; | ||
@@ -48,4 +53,6 @@ class ActionBus { | ||
this.registerHandler = (guard, handler)=>{ | ||
this.subscriptions.add(this._action$.pipe(operators.filter((value)=>guard(value) | ||
)).subscribe(handler)); | ||
const subscription = this._action$.pipe(operators.filter((value)=>guard(value) | ||
)).subscribe(handler); | ||
this.subscriptions.add(subscription); | ||
return subscription; | ||
}; | ||
@@ -1049,2 +1056,3 @@ this.dispose = ()=>{ | ||
exports.matches = matches; | ||
exports.notOfType = notOfType; | ||
exports.ofType = ofType; | ||
@@ -1051,0 +1059,0 @@ exports.on = on; |
{ | ||
"name": "@brandingbrand/cargo-hold", | ||
"version": "11.56.0", | ||
"version": "11.57.0", | ||
"license": "MIT", | ||
@@ -10,6 +10,6 @@ "typings": "./src/index.d.ts", | ||
"rxjs": "^7.5.2", | ||
"@brandingbrand/standard-compose": "11.56.0", | ||
"@brandingbrand/standard-result": "11.56.0", | ||
"@brandingbrand/types-utility": "11.56.0", | ||
"@brandingbrand/standard-lens": "11.56.0", | ||
"@brandingbrand/standard-compose": "11.57.0", | ||
"@brandingbrand/standard-result": "11.57.0", | ||
"@brandingbrand/types-utility": "11.57.0", | ||
"@brandingbrand/standard-lens": "11.57.0", | ||
"fast-deep-equal": "^3.1.3" | ||
@@ -16,0 +16,0 @@ }, |
@@ -11,4 +11,4 @@ import type { PAYLOAD } from '../internal/tokens'; | ||
dispatch: (action: AnyAction) => void; | ||
registerHandler: <Specifier extends AnyActionSpecifier>(guard: TypeGuard<AnyActionSpecifier, Specifier>, handler: ActionHandler<Action<Specifier["type"], NonNullable<Specifier[typeof PAYLOAD]>, Specifier["subtype"]>>) => void; | ||
registerHandler: <Specifier extends AnyActionSpecifier>(guard: TypeGuard<AnyActionSpecifier, Specifier>, handler: ActionHandler<Action<Specifier["type"], NonNullable<Specifier[typeof PAYLOAD]>, Specifier["subtype"]>>) => Subscription; | ||
dispose: () => void; | ||
} |
import type { PAYLOAD } from '../internal/tokens'; | ||
import type { Action, ActionCreator, ActionSpecifier, AnyActionSpecifier } from './action-bus.types'; | ||
import type { Action, ActionCreator, AnyAction, AnyActionSpecifier } from './action-bus.types'; | ||
import { NonEmptyArray } from '../internal/util/functional/non-empty-array.types'; | ||
@@ -13,2 +13,3 @@ export declare type TypeGuard<A, B extends A> = (val: A) => val is B; | ||
export declare const createActionCreator: <ActionKey extends string, Subtype extends string | undefined, Payload, Params extends unknown[] = []>(options: CreateActionOptions<ActionKey, Subtype, Payload, Params>) => ActionCreator<ActionKey, Subtype, Payload, Params>; | ||
export declare const ofType: <ActionType extends AnyActionSpecifier>(...selectActions: NonEmptyArray<ActionType>) => import("rxjs").OperatorFunction<ActionSpecifier<string, any, unknown>, Action<ActionType["type"], NonNullable<ActionType[typeof PAYLOAD]>, ActionType["subtype"]>>; | ||
export declare const ofType: <ActionType extends AnyActionSpecifier>(...selectActions: NonEmptyArray<ActionType>) => import("rxjs").OperatorFunction<AnyAction<unknown>, Action<ActionType["type"], NonNullable<ActionType[typeof PAYLOAD]>, ActionType["subtype"]>>; | ||
export declare const notOfType: (...selectActions: NonEmptyArray<AnyActionSpecifier>) => import("rxjs").MonoTypeOperatorFunction<AnyAction<unknown>>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143630
2700
+ Added@brandingbrand/standard-branded@11.57.0(transitive)
+ Added@brandingbrand/standard-compose@11.57.0(transitive)
+ Added@brandingbrand/standard-lens@11.57.0(transitive)
+ Added@brandingbrand/standard-result@11.57.0(transitive)
+ Added@brandingbrand/types-utility@11.57.0(transitive)
- Removed@brandingbrand/standard-branded@11.56.0(transitive)
- Removed@brandingbrand/standard-compose@11.56.0(transitive)
- Removed@brandingbrand/standard-lens@11.56.0(transitive)
- Removed@brandingbrand/standard-result@11.56.0(transitive)
- Removed@brandingbrand/types-utility@11.56.0(transitive)