Skip to content

Commit

Permalink
docs: added docstrings and updated README [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Uninen committed Nov 30, 2024
1 parent 550dcfc commit 577d8a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ General utilities for Web development
### Browser

- `browserIsIE()`
- `browserIsSupported()`
- `copyToClipboard(content: string)`
- `getCookie(name: string)`
- `hasTimeZoneSupport()`
- `isValidSecureUrl(url: string)`
- `prefetchImages(url: string|string[])`
- `storageAvailable(type: 'localStorage' | 'sessionStorage')`
Expand Down
3 changes: 3 additions & 0 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export function browserIsIE() {
return ua.indexOf('MSIE ') > -1 || ua.indexOf('Trident/') > -1
}

/**
* Returns true if the browser has modern timezone support, localStorage is available and is not IE.
*/
export function browserIsSupported() {
if (isSSR()) {
return false
Expand Down

0 comments on commit 577d8a3

Please sign in to comment.