Javascript 标准化器&x2013;是否可以有条件地删除实体?

Javascript 标准化器&x2013;是否可以有条件地删除实体?,javascript,normalizr,Javascript,Normalizr,所以我用normalizer来处理一些我认为合适的数据。但是,我的应用程序不需要通过normalizer传递的一些实体。有没有一种方法可以使用流程策略或类似的方法来抛弃实体?谢谢 const testSchema = new schema.Entity('things', {}, { idAttribute: thing => `${thing.id}`, processStrategy: (value, parent, key) => { if(!obj.mappin

所以我用normalizer来处理一些我认为合适的数据。但是,我的应用程序不需要通过normalizer传递的一些实体。有没有一种方法可以使用流程策略或类似的方法来抛弃实体?谢谢

const testSchema = new schema.Entity('things', {}, {
  idAttribute: thing => `${thing.id}`,
  processStrategy: (value, parent, key) => {

  if(!obj.mapping[value.fields.id]){
    // If we get in here, this entity is not needed as 
    // there is no mapping available.
    // How can i throw this entity out?
  }

  return {
    ...value.fields,
    prop: obj.mapping[value.fields.id].mapped_thing,
    prop2: obj.mapping[value.fields.id].mapped_thing2,
    prop3: obj.mapping[value.fields.id].mapped_thing3
  }  
 }
});   
这样的事情可能吗?还是有更好的方法来删除实体