## Using the Package

The following works when your package runs from a browser-like environment; i.e., when one of `window`, `global`, `self`, or `this` points to a Window object in the current environment.

```js
import {win} from 'window-var';
console.log(win.document.URL);
```

Which is a much shorter version of this longer equivalency.

```js
console.log((() => {
  if (typeof window !== 'undefined') {
    return window;
  } else if (typeof global !== 'undefined') {
    return global;
  } else if (typeof self !== 'undefined') {
    return self;
  } else {
    return this;
  }
})().document.URL);
```

### Alternate Imports

This way allows you to work out the window var later by calling the `.get()` method on-demand.

```js
import win from 'window-var';
console.log(win.get().document.URL);
```

This is basically the same as the previous example, but a little cleaner.

```js
import {get as win} from 'window-var';
console.log(win().document.URL);
```
