Skip to content

Commit

Permalink
Add browser const
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaitanLyss committed Aug 8, 2024
1 parent 8f62574 commit 01def1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@selenite/commons",
"version": "0.18.16",
"version": "0.18.17",
"repository": "github:ShaitanLyss/selenite-commons",
"license": "MIT",
"keywords": [
Expand Down
5 changes: 5 additions & 0 deletions src/lib/utils/html.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export function isBrowser() {
return typeof window !== 'undefined';
}

/**
* Constant indicating whether the current environment is a browser.
*/
export const browser = isBrowser();

export function posFromClient({
clientX: x,
clientY: y
Expand Down

0 comments on commit 01def1a

Please sign in to comment.