Skip to main content
Module

x/fae/head.ts>head

A functional module for Deno inspired from Ramda.
Latest
variable head
import { head } from "https://deno.land/x/fae@v1.1.1/head.ts";

Returns the first element of the given list or string. In some libraries this function is named first.

 Fae.head(['fi', 'fo', 'fum']); //=> 'fi'
 Fae.head([]); //=> undefined

 Fae.head('abc'); //=> 'a'
 Fae.head(''); //=> ''

type

Head