Skip to content
Subhajit Sahu edited this page Jun 28, 2020 · 6 revisions

Checks if object has a key. 🏃 📼 📦 🌔 📒

Similar: key, keys, has.

object.has(x, k);
// x: an object
// k: key?
const object = require('extra-object');

var x = {a: 1, b: 2, c: -3};
object.has(x, 'd');
// false

object.has(x, 'c');
// true

references

Clone this wiki locally