sortfilterfind
v1.3.0
Published
Class to perform simple operations on arrays of objects: Sort / Find / Filter
Downloads
891
Maintainers
Readme
SortFilterFind
This library was generated with Angular CLI version 17.3.0.
Description
Class to perform simple operations on arrays of objects: Sort / Find / Filter.
Installation
npm i sortfilterfind
Example Usage in Angular
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { SortFilterFind } from 'sort-filter-find';
interface Person {
nom: string;
age: number;
}
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
title = 'appTest';
liste_personne: Array<Person> = [
{ nom: 'lemuel', age: 14 },
{ nom: 'ange', age: 15 }
];
constructor() {
const result = new SortFilterFind(this.liste_personne, 'ASC', 'age', 15)
.sort()
.filter();
}
}