Skip to content
Subhajit Sahu edited this page Dec 8, 2022 · 13 revisions

Gets first entry from object (default order).

Similar: head, tail.


function head(x, ed)
// x:  an object
// ed: default entry
const object = require('extra-object');

object.head({a: 1, b: 2, c: 3});
// → [ 'a', 1 ]

object.head({});
// → [ null, undefined ]


References

Clone this wiki locally