@walletconnect/window-getters
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

window-getters npm version

Safe Window Getters

API

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;

Package Sidebar

Install

npm i @walletconnect/window-getters

Weekly Downloads

420,001

Version

1.0.1

License

MIT

Unpacked Size

218 kB

Total Files

14

Last publish

Collaborators

  • cyberdrk
  • nachosan
  • huxwell
  • chris13524
  • crypblizz
  • devceline
  • gancho_walletconnect
  • bkrem
  • pedrouid