1.0.0-beta.0 • Published 1 year ago

@ryze-digital/js-utilities v1.0.0-beta.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

RYZE Digital JavaScript Utilities

Run linter(s) workflow status

Install

npm i @ryze-digital/js-utilities

Usage

import * as utils from '@ryze-digital/js-utilities';

Example

this.breakpointProvider = new utils.BreakpointProvider();

window.matchMedia(`(min-width: ${this.breakpointProvider.breakpoints.large})`).addListener(() => {
    // Code gets executed when the viewport is at least "large"
});

if (window.matchMedia(`(max-width: ${this.breakpointProvider.breakpoints.medium})`).matches) {
    // Condition evaluates to true, if the viewport is at most "medium"
}