UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

21 lines (17 loc) 523 B
/*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ "use strict"; (() => { // src/matchMedia.ts function windowMatchMedia() { return typeof window !== "undefined" ? window.matchMedia || window.msMatchMedia : void 0; } // src/isPrefersReducedMotion.ts function isPrefersReducedMotion() { const mediaQuery = windowMatchMedia()?.("(prefers-reduced-motion: reduce)"); return typeof window !== "undefined" ? mediaQuery?.matches : false; } })();