Skip to main content
Module

x/denofun/last.ts>default

Small utility library containing functions, monads and other fun stuff.
Latest
function default
import { default } from "https://deno.land/x/denofun@v0.2.0/last.ts";

last accepts a list of items (or a string) and returns the last element (or character)

Type Parameters

T extends any

Parameters

xs: T[] | string

elements that function will be applied to

Returns

string | T

the last element of the array