# @walletconnect/window-getters

> Safe Window Getters

Latest version **1.0.1** (published 2022-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @walletconnect/window-getters
pnpm add @walletconnect/window-getters
yarn add @walletconnect/window-getters
bun add @walletconnect/window-getters
```

## Health

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

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-11-25 |
| First published | 2021-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 212.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 132 |
| Author | WalletConnect, Inc. |
| Maintainers | crypblizz, devceline, gancho_walletconnect, sbc64, iljadoesdev, bkrem, pedrouid |
| Keywords | window, undefined, isomorphic, getters, throw |

## Links

- npm: https://www.npmjs.com/package/@walletconnect/window-getters
- Repository: https://github.com/walletconnect/walletconnect-utils
- Issues: https://github.com/walletconnect/walletconnect-utils/issues
- npm.io page: https://npm.io/package/@walletconnect/window-getters

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) 1.14.1

## Recent versions

- 1.0.1 (latest) — 2022-11-25
- 1.0.0-beta.1 (beta) — 2021-07-26
- 1.0.0 — 2021-07-28

## README

# window-getters [![npm version](https://badge.fury.io/js/window-getters.svg)](https://badge.fury.io/js/window-getters)

Safe Window Getters

## API

```typescript
function getFromWindow<T>(name: string): T | undefined;
function getFromWindowOrThrow<T>(name: string): T;

function getDocumentOrThrow(): Document;
function getDocument(): Document | undefined;

function getNavigatorOrThrow(): Navigator;
function getNavigator(): Navigator | undefined;

function getLocationOrThrow(): Location;
function getLocation(): Location | undefined;

function getCryptoOrThrow(): Crypto;
function getCrypto(): Crypto | undefined;

function getLocalStorageOrThrow(): Storage;
function getLocalStorage(): Storage | undefined;
```

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