Skip to content
Subhajit Sahu edited this page Jun 17, 2020 · 14 revisions

Gets first entry. 🏃 📼 📦 🌔 📒

Similar: head, tail.

entries.head(x, [ed]);
// x:  entries
// ed: default entry
const entries = require('extra-entries');

var x = new Map([['a', 1], ['b', 2], ['c', 3]]);
map.head(x);
// [ 'a', 1 ]

var x = new Map();
map.head(x);
// [ undefined, undefined ]

references

Clone this wiki locally