mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-15 11:12:22 +00:00
refactor: remove lodash
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Injectable, Pipe, PipeTransform} from '@angular/core';
|
||||
import {last} from 'lodash-es';
|
||||
|
||||
/**
|
||||
* Get the last value of an array
|
||||
@@ -30,6 +29,6 @@ export class ArrayLastPipe implements PipeTransform {
|
||||
*/
|
||||
// tslint:disable-next-line:prefer-function-over-method
|
||||
transform<T>(value: T[]): T | undefined {
|
||||
return last(value);
|
||||
return value[value.length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user