Skip to content

ryze-digital/js-utilities

Repository files navigation

RYZE Digital JavaScript Utilities

Run linter(s) workflow status

Install

npm i @ryze-digital/js-utilities --save

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"
}

About

Contains several helpers and utilities for JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published