Files
ihrm/node_modules/collect.js/docs/api/has.md
Nikhil Ravi Cybrosys e1794e7422 [UPDT]translations in the views (#4)
[UPDT]Translations in the views
[FIX]major bug fixes
2023-05-18 15:05:28 +05:30

24 lines
430 B
Markdown
Executable File

# `has()`
The has method determines if one or more keys exists in the collection:
```js
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](https://github.com/ecrmnn/collect.js/blob/master/src/methods/has.js)