UNPKG

foreword

Version:

A JavaScript library for functional data transformation

17 lines (12 loc) 299 B
const test = require('tape') const { head } = require('../../array') test('array head: get first element in array', t => { const result = head([1, 2, 3]) t.same(result, 1) t.end() }) test('array head: empty array', t => { const result = head([]) t.same(result, undefined) t.end() })