Neolithic Psychedelic Mushrooms
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    on-window-sizepublic

    on-window-size Build Status

    Listen to the window size

    Install

    $ npm install --save on-window-size

    Usage

    var onWindowSize = require('on-window-size')
     
    onWindowSize(function (size) {
      console.log(size) // => {x: Number, y: Number} 
    })

    API

    var unlisten = onWindowSize(listener)

    Calls listener with the result of screen-size when the window size changes.

    Call the returned unlisten function to stop listening.

    License

    MIT © Andrew Joslin

    install

    npm i on-window-size

    Downloadslast 7 days

    3

    version

    1.0.2

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar