# ak-hasattr

> Search key exists, in a deep json object

Latest version **1.0.6** (published 2021-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install ak-hasattr
pnpm add ak-hasattr
yarn add ak-hasattr
bun add ak-hasattr
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-08-15 |
| First published | 2019-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Arshad Kazmi |
| Maintainers | arshadkazmi42 |
| Keywords | has, contains, jsonhas, jsonattribute, jsonattr, jsoncontains, json, hasattr |

## Links

- npm: https://www.npmjs.com/package/ak-hasattr
- Repository: https://github.com/arshadkazmi42/hasattr
- Homepage: https://github.com/arshadkazmi42/hasattr#readme
- Issues: https://github.com/arshadkazmi42/hasattr/issues
- npm.io page: https://npm.io/package/ak-hasattr

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.6 (latest) — 2021-08-15
- 1.0.5 — 2021-08-15
- 1.0.4 — 2020-04-30
- 1.0.3 — 2019-08-18
- 1.0.2 — 2019-01-24
- 1.0.1 — 2019-01-13
- 1.0.0 — 2019-01-13

## README

# hasattr :mag_right:

[![Build Status](https://travis-ci.com/arshadkazmi42/hasattr.svg?branch=master)](https://travis-ci.com/arshadkazmi42/hasattr)
[![NPM Downloads](https://img.shields.io/npm/dt/ak-hasattr.svg)](https://www.npmjs.com/package/ak-hasattr)
[![Package Size](https://img.shields.io/bundlephobia/min/ak-hasattr.svg)](https://www.npmjs.com/package/ak-hasattr)
[![NPM Version](https://img.shields.io/npm/v/ak-hasattr.svg)](https://www.npmjs.com/package/ak-hasattr)
[![Contributors](https://img.shields.io/github/contributors/arshadkazmi42/hasattr.svg)](https://github.com/arshadkazmi42/hasattr/graphs/contributors)
[![Commit](https://img.shields.io/github/last-commit/arshadkazmi42/hasattr.svg)](https://github.com/arshadkazmi42/hasattr/commits/master)

Search key, in a deep json object or array

<a href="https://www.buymeacoffee.com/arshadkazmi42" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
<a href="https://www.patreon.com/bePatron?u=15454240" target="_blank"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron!" height="39"></a>

Please consider donating, if you like my work


## Installation

#### Using npm 

```
npm install ak-hasattr
```

#### Using yarn

```
yarn add ak-hasattr
```

## Usage

```javascript
const hasAttr = require('ak-hasattr');
const JSON = {
  'name': 'Arshad Kazmi',
  'profile': {
    'github': {
      'username': 'arshadkazmi42',
      'repos': [
        {
          'repo_name': 'hasattr',
          'url': 'https://github.com/arshadkazmi42/hasattr',
        },
      ],
    },
    'twitter': {
      'username': 'arshadkazmi42',
    },
  },
};

console.log(hasAttr('name', JSON));
// true

console.log(hasAttr('repo_name', JSON));
// true

console.log(hasAttr('something', JSON));
// false

```

## Contributing

We are constantly working on improving `hasattr` and we need all the help we can get. 

You can contribute to this project by giving [suggestions](https://github.com/arshadkazmi42/hasattr/issues/new), fixing [open issues](https://github.com/arshadkazmi42/hasattr/issues) or by implementing a new feature. Read our contibution guide [here](CONTRIBUTING.md)

## Contributors

Thank you to all the contributors who help in making this project better 🙌

<a href="https://github.com/arshadkazmi42"><img src="https://github.com/arshadkazmi42.png" width="30" /></a><a href="https://github.com/DXJ3X1"><img src="https://github.com/DXJ3X1.png" width="30" /></a>

---
_Source: https://npm.io/package/ak-hasattr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
