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 )
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    2
  • 0.0.1
    1

Package Sidebar

Install

npm i flyd-windowresize

Weekly Downloads

3

Version

0.0.2

License

MIT

Last publish

Collaborators

  • jayrbolton
  • the_swerve