Skip to Main Content
Player Logo
PlayerPlugins

Data Filter Plugin

The data-filter-plugin enables users to filter out segments of the data-model during serialization.

Usage

Add the plugin to Player and configure the exclusion paths:
import { Player } from '@player-ui/player';
import { DataFilterPlugin } from '@player-ui/data-filter-plugin';

const player = new Player({
  plugins: [
    new DataFilterPlugin({
      paths: ['local', 'constants'],
    }),
  ],
});
This will exclude any top-level local or constants paths in the data-model from appearing in the serialized response.