# @types/nwmatcher

> TypeScript definitions for nwmatcher

Latest version **1.4.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/nwmatcher
pnpm add @types/nwmatcher
yarn add @types/nwmatcher
bun add @types/nwmatcher
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2023-11-07 |
| First published | 2018-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/nwmatcher
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nwmatcher
- npm.io page: https://npm.io/package/@types/nwmatcher

## Recent versions

- 1.4.4 (latest) — 2023-11-07
- 1.4.2 (ts3.2) — 2020-09-17
- 1.4.1 (ts2.0) — 2019-02-13
- 1.4.3 — 2023-10-18
- 1.4.0 — 2018-10-22

## README

# Installation
> `npm install --save @types/nwmatcher`

# Summary
This package contains type definitions for nwmatcher (https://github.com/dperini/nwmatcher).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nwmatcher.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nwmatcher/index.d.ts)
````ts
declare function nwmatcher(global: { document: Document }): nwmatcher.Matcher;

declare namespace nwmatcher {
    interface Matcher {
        // DOM Selection

        first: (selector: string, context?: Element) => Element | null;
        match: (element: Element, selector: string, context?: Element) => boolean;
        select: (selector: string, context?: Element, callback?: (element: Element) => void) => Element[];

        // DOM Helpers

        byId: (id: string, from?: Element) => Element | null;
        byTag: (tag: string, from?: Element) => Element[];
        byClass: (className: string, from?: Element) => Element[];
        byName: (name: string, from?: Element) => Element[];
        getAttribute: (element: Element, attribute: string) => string | undefined;
        hasAttribute: (element: Element, attribute: string) => boolean;
    }
}

declare global {
    namespace NW {
        const Dom: nwmatcher.Matcher;
    }
}

export = nwmatcher;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Wouter van Heeswijk](https://github.com/woutervh-).

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