Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 0ee77c3

Browse files
feat: utils isSafari
Signed-off-by: peterpeterparker <[email protected]>
1 parent 667aa5b commit 0ee77c3

File tree

6 files changed

+42
-4
lines changed

6 files changed

+42
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
### Others
2424

25-
- utils: v5.0.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/utils/utils/CHANGELOG.md))
25+
- utils: v5.1.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/utils/utils/CHANGELOG.md))
2626

2727
<a name="5.2.0"></a>
2828

package-lock.json

Lines changed: 28 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
"hooks": {
4242
"pre-commit": "pretty-quick --staged"
4343
}
44+
},
45+
"dependencies": {
46+
"@deckdeckgo/utils": "file:utils/utils"
4447
}
4548
}

utils/utils/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# 5.0.0 (2022-01-08)
1+
# 5.0.0 (2022-01-31)
2+
3+
### Features
4+
5+
- new function `isSafari`
6+
7+
# 5.0.0 (2022-01-31)
28

39
### Build
410

utils/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deckdeckgo/utils",
3-
"version": "5.0.0",
3+
"version": "5.1.0",
44
"author": "David Dal Busco",
55
"description": "A collection of utils methods and functions developed for DeckDeckGo",
66
"license": "MIT",

utils/utils/src/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export function isFirefox(): boolean {
7171
return /firefox/i.test(a);
7272
}
7373

74+
export const isSafari = (): boolean => /apple/i.test(navigator.vendor);
75+
7476
export function isRTL(): boolean {
7577
const htmlDir: string | null = document.documentElement.getAttribute('dir');
7678
return htmlDir !== null && htmlDir === 'rtl';

0 commit comments

Comments
 (0)