@techmely/utils
Version:
Collection of helpful JavaScript / TypeScript utils
19 lines (16 loc) • 640 B
JavaScript
import { isBrowser } from './chunk-AJMQPQGJ.mjs';
import './chunk-NYLAFCGV.mjs';
// src/alias.ts
var $ = (tag) => isBrowser() ? document.querySelector.call(void 0, tag) : null;
var $$ = (tag) => isBrowser() ? document.querySelectorAll.call(void 0, tag) : null;
HTMLElement.prototype.on = (a, b, c) => (
// @ts-expect-error Ignore typing check
isBrowser() ? void 0 : null
);
HTMLElement.prototype.of = (a, b, c) => (
// @ts-expect-error Ignore typing check
isBrowser() ? void 0 : null
);
HTMLElement.prototype.$ = (s) => isBrowser() ? void 0 : null;
HTMLElement.prototype.$$ = (s) => isBrowser() ? void 0 : null;
export { $, $$ };