src.app.shared.pipes.without-scenario-pipe.ts Maven / Gradle / Ivy
The newest version!
/*
* SPDX-FileCopyrightText: 2017-2024 Enedis
*
* SPDX-License-Identifier: Apache-2.0
*
*/
import { Pipe, PipeTransform } from '@angular/core';
import { ScenarioIndex } from '@model';
@Pipe({
name: 'withoutScenario'
})
export class WithoutScenarioPipe implements PipeTransform {
transform(input: Array, scenarioToExclude: Array) {
return input.filter((item) => {
return !scenarioToExclude === undefined || !scenarioToExclude.includes(item);
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy