flyd-windowresize

0.0.2 • Public • Published

Generate a flyd stream for document size, in streams of pairs of [document.body.offsetWidth, document.body.offsetHeight]. Each pair is pushed to the stream whenever the user resizes their window.

import windowStream from 'flyd-windowresize'
 
windowStream() // [100, 200]
// user resizes window...
windowStream() // [400, 500]
 
halfSize$ = flyd.map(
  (pair) => [pair[0] / 2, pair[1] / 2]
, windowStream )
 

/flyd-windowresize/

    Package Sidebar

    Install

    npm i flyd-windowresize

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • jayrbolton
    • the_swerve