@untemps/user-permissions-utils 1.1.33 → 1.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -54,6 +54,30 @@ const init = async () => {
|
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
`isNavigatorPermissionsSupported`:
|
|
58
|
+
|
|
59
|
+
Returns `true` if the browser supports `navigator.permissions`
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
import { isNavigatorPermissionsSupported } from '@untemps/user-permissions-utils'
|
|
63
|
+
|
|
64
|
+
if (!isNavigatorPermissionsSupported()) {
|
|
65
|
+
console.warn('Navigator Permissions API is not supported in this browser')
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`isNavigatorMediaDevicesSupported`:
|
|
70
|
+
|
|
71
|
+
Returns `true` if the browser supports `navigator.mediaDevices`
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
import { isNavigatorMediaDevicesSupported } from '@untemps/user-permissions-utils'
|
|
75
|
+
|
|
76
|
+
if (!isNavigatorMediaDevicesSupported()) {
|
|
77
|
+
console.warn('Navigator MediaDevices API is not supported in this browser')
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
57
81
|
## Todos
|
|
58
82
|
|
|
59
83
|
- Add permissions-based API:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@untemps/user-permissions-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.35",
|
|
4
4
|
"description": "Collection of utility functions to manage user permissions",
|
|
5
5
|
"repository": "git@github.com:untemps/user-permissions-utils.git",
|
|
6
6
|
"keywords": [
|
|
@@ -10,12 +10,22 @@
|
|
|
10
10
|
],
|
|
11
11
|
"author": "Vincent Le Badezet <v.lebadezet@untemps.net>",
|
|
12
12
|
"license": "MIT",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22"
|
|
15
|
+
},
|
|
13
16
|
"private": false,
|
|
14
17
|
"publishConfig": {
|
|
15
18
|
"access": "public"
|
|
16
19
|
},
|
|
17
20
|
"main": "dist/index.js",
|
|
18
21
|
"module": "dist/index.es.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/index.es.js",
|
|
25
|
+
"require": "./dist/index.js",
|
|
26
|
+
"default": "./dist/index.es.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
19
29
|
"files": [
|
|
20
30
|
"dist"
|
|
21
31
|
],
|