bwindow

2.0.3 • Public • Published

bwindow

Build Status npm Version JS Standard

Browser window accessor

Installation

$ npm install bwindow --save

Usage

'use strict'
 
const { get } = require('bwindow')
 
// Check document object available
{
  let isServerSide = !get('document')
  /* ... */
}
 
// With strict options, throws an error when not found
{
  let URL = get('URL', { strict: true })
  /* ... */
}
 

Functions

Available functions

Signature Description
get(name, options, options.strict) -> ?Object Get object from window
once(event, handler) -> function Bind window event once
set(name, value, options, options.strict) -> ?Object Set object to window

License

This software is released under the MIT License.

Links

Readme

Keywords

none

Package Sidebar

Install

npm i bwindow

Weekly Downloads

49

Version

2.0.3

License

MIT

Unpacked Size

25.2 kB

Total Files

33

Last publish

Collaborators

  • okunishinishi