/* * Copyright (c) 2019. Mario Studio. All right reserved. */ import { Pipe, PipeTransform, } from '@angular/core'; import { List, sortedIndexBy, ValueIteratee, } from 'lodash'; @Pipe({ name: 'sortedIndexBy', }) export class SortedIndexByPipe implements PipeTransform { transform ( array: List | null | undefined, value: T, iteratee?: ValueIteratee, ): number { return sortedIndexBy(array, value, iteratee); } }