1.0.0 • Published 6 months ago

iptools-utils v1.0.0

Weekly downloads
8
License
GPL-3.0
Repository
github
Last release
6 months ago

iptools-utils

IPTools Utilities bundle for media query detection and event namespacing

Media query detection

1. @use SCSS package with your project-specific media queries

@use 'iptools-utils' with ($breakpoints: $my-media-queries);

Note: $my-breakpoints MUST be an SCSS map with key-value pairs, where the key is the name of the breakpoint and the value is the actual media query, i.e. what you would write after @media in CSS.

Alternatively, you can use the default media queries like this:

@use 'iptools-utils';

or by using the supplied iptools-utils.default.css.

2. import media detection

import { media } from 'iptools-utils';

3. Use media query detection

  • media.isMediaQuery('tablet'); true/false
  • media.getMediaQueries();

      {
        "phone": false,
        "tablet": true,
        "desktop": false
      }

Event namespacing

1. import event namespacing

import { getNamespacedEvents } from 'iptools-utils';

2. Use namespacing function

getNamespacedEvents('eventName', 'myNamespace');
getNamespacedEvents(['eventName1, eventName2', 'eventName3'], 'myNamespace');
1.0.0

6 months ago

0.4.0

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago