import { Pipe, PipeTransform } from '@angular/core'; import { orderBy } from 'lodash'; /** * Sort array pipe * * This is currently used with the pin feature of the list component * * Example: *
* // Individual module import
* import { SortArrayPipeModule } from 'patternfly-ng/pipe';
* // Or
* import { SortArrayPipeModule } from 'patternfly-ng';
*
* @NgModule({
* imports: [SortArrayPipeModule,...]
* })
* export class AppModule(){}
*
*/
@Pipe({ name: 'sortArray'})
export class SortArrayPipe implements PipeTransform {
/**
* Sort array by property
*
* @param {Array