Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedrouid/window-getters
Safe Window Getters
https://github.com/pedrouid/window-getters
Last synced: 13 days ago
JSON representation
Safe Window Getters
- Host: GitHub
- URL: https://github.com/pedrouid/window-getters
- Owner: pedrouid
- License: mit
- Created: 2020-10-04T15:19:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-15T11:49:25.000Z (about 4 years ago)
- Last Synced: 2024-11-29T06:39:29.167Z (30 days ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/window-getters
- Size: 126 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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(name: string): T | undefined;
function getFromWindowOrThrow(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;
```