@standard-library/kefir-matches-media

0.1.1 • Public • Published

Kefir.matchesMedia

Wraps the browser matchMedia API in a Kefir property stream. The resulting property is the boolean value equal to the media query match.

Installation

yarn add @standard-library/kefir-matches-media

Usage

import matchesMedia from "@standard-library/kefir-matches-media";

const isNarrow = matchesMedia(window, "(max-width: 500px)");
# <value> true
# ... resize browser to be narrow
# <value> false

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.10latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.10
0.1.00

Package Sidebar

Install

npm i @standard-library/kefir-matches-media

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • standard-library