@extra-entries/has

Checks if entries has a key. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Usage no npm install needed!

<script type="module">
  import extraEntriesHas from 'https://cdn.skypack.dev/@extra-entries/has';
</script>

README

Checks if entries has a key. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Alternatives: has, hasValue, hasEntry, hasSubset, hasPath.
Similar: key, keys, has.

This is part of package extra-entries.


entries.has(x, k);
// x: entries
// k: key?
const entries = require("extra-entries");

var x = [["a", 1], ["b", 2], ["c", -3]];
entries.has(x, "d");
// false

entries.has(x, "c");
// true


References