lists-first

Get first value in lists, like Array[0].

Usage no npm install needed!

<script type="module">
  import listsFirst from 'https://cdn.skypack.dev/lists-first';
</script>

README

lists-first

NOTE: lists-first was renamed to @extra-lists/first. NPM

Get first value in lists, like Array[0].

const first = require('lists-first');
// first(<lists>)

a = ['singh', 'is', 'king'];
first([a.keys(), a]);
// [0, 'singh']
a = {w1: 'chakh', w2: 'de', w3: 'phatte'};
first([Object.keys(a), Object.values(a)]);
// ['w1', 'chakh']