Comparing version 1.58.0 to 1.58.1
@@ -9,4 +9,4 @@ "use strict"; | ||
exports.last = last; | ||
function _last(array) { | ||
return array[array.length - 1]; | ||
function _last(data) { | ||
return data[data.length - 1]; | ||
} |
@@ -5,4 +5,4 @@ import { purry } from "./purry"; | ||
} | ||
function _last(array) { | ||
return array[array.length - 1]; | ||
function _last(data) { | ||
return data[data.length - 1]; | ||
} |
@@ -1,6 +0,7 @@ | ||
import type { NonEmptyArray } from "./_types"; | ||
import type { IterableContainer } from "./_types"; | ||
import type { LastArrayElement } from "./type-fest/last-array-element"; | ||
/** | ||
* Gets the last element of `array`. | ||
* | ||
* @param array - The array. | ||
* @param data - The array. | ||
* @signature | ||
@@ -15,4 +16,3 @@ * R.last(array) | ||
*/ | ||
export declare function last<T>(array: Readonly<NonEmptyArray<T>>): T; | ||
export declare function last<T>(array: ReadonlyArray<T>): T | undefined; | ||
export declare function last<T extends IterableContainer>(data: T): LastArrayElement<T>; | ||
/** | ||
@@ -34,3 +34,3 @@ * Gets the last element of `array`. | ||
*/ | ||
export declare function last<T>(): (array: ReadonlyArray<T>) => T | undefined; | ||
export declare function last<T extends IterableContainer>(): (data: T) => LastArrayElement<T>; | ||
//# sourceMappingURL=last.d.ts.map |
{ | ||
"name": "remeda", | ||
"version": "1.58.0", | ||
"version": "1.58.1", | ||
"description": "A utility library for JavaScript and Typescript.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
637983
735
12890