Files
rspade_system/node_modules/collect.js/docs/api/has.md
2025-12-03 21:28:08 +00:00

407 B
Executable File

has()

The has method determines if one or more keys exists in the collection:

const collection = collect({
  animal: 'unicorn',
  ability: 'magical',
});

collection.has('ability');

// true

collection.has(['animal', 'ability']);

// true

collection.has(['animal', 'ability', 'name']);

// false

View source on GitHub