lists-is

Check if value is lists.

Usage no npm install needed!

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

README

lists-is

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

Check if value is lists.

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

a = ['italy', 'rome', 'caesar'];
is([a.keys(), a]);
// true
a = {p1: 'pompeii', p2: 'caesar', p2: 'crassus'};
is([Object.keys(a), Object.values(a)]);
// true
a = new Set(['caesar', 'calphurnia']);
is([a.keys(), a.values()]);
// true
a = new Map([['h', 'brutus'], ['w', 'portia']]);
is([a.keys(), a.values()]);
// true
is('cassius');
// false