JSPM

store-devtools-switcher

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q46831F
  • License ISC

Hide entries from NgRx state serialization

Package Exports

  • store-devtools-switcher

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (store-devtools-switcher) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Store Devtools Switcher

Enable/disable store entries to display in Redux DevTools on the fly from the Chrome DevTools console.

2020-08-05_17-41-55 (1)

Install

npm install --save-dev store-devtools-switcher 

Usage

Just import and use the provided state sanitizer as parameter of the StoreDevtools instrument.

import { stateSanitizer } from 'store-devtools-switcher'

@NgModule({
  imports: [
    BrowserModule,
    StoreModule.forRoot({}),
    StoreDevtoolsModule.instrument({
      stateSanitizer
    })
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {}

With a custom sanitizer

If you already uses a custom sanitizer, just wrap it with the store-devtools-switcher one.

import { stateSanitizer as switcherSanitizer } from 'store-devtools-switcher'

@NgModule({
  imports: [
    BrowserModule,
    StoreModule.forRoot({}),
    StoreDevtoolsModule.instrument({
      stateSanitizer: switcherSanitizer(myCustomSanitizer)
    })
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {}