UNPKG
cpt-waffle-lotide
Version:
latest (1.0.0)
1.0.0
LoTide in Typescript
github.com/vasiliy-klimkin/lotide-ts
vasiliy-klimkin/lotide-ts
cpt-waffle-lotide
/
dist
/
head.ts
8 lines
(6 loc)
•
191 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
const
head
= (array: any[]):any => {
if
(!array || array.length === 0)
return
null;
return
array[0]; }
export
default
head
; // assertEqual(
head
([
"Hello"
,
"Lighthouse"
,
"Labs"
]),
"Hello"
);