Gathering detailed insights and metrics for ngx-check-permission
Gathering detailed insights and metrics for ngx-check-permission
npm install ngx-check-permission
Typescript
Module System
Node Version
NPM Version
65.3
Supply Chain
96.3
Quality
79.7
Maintenance
100
Vulnerability
98.9
License
JavaScript (100%)
Total Downloads
4,929
Last Day
1
Last Week
16
Last Month
128
Last Year
2,134
29 Commits
2 Forks
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.11
Package Id
ngx-check-permission@3.0.11
Unpacked Size
23.82 kB
Size
6.87 kB
File Count
12
NPM Version
10.2.5
Node Version
18.19.1
Publised On
01 Dec 2024
Cumulative downloads
Total Downloads
Last day
-75%
1
Compared to previous day
Last week
-62.8%
16
Compared to previous week
Last month
-23.4%
128
Compared to previous month
Last year
29.2%
2,134
Compared to previous year
1
2
Angular library which provides device permission status which are allowed for current device / system.
Import the module on your app.module.ts
file as follow.
import { NgxCheckPermissionModule } from 'ngx-check-permission';
Then import the module as follow on imports array
NgxCheckPermissionModule
Import the servie to appropriate component / service file as follows.
import { NgxCheckPermissionService } from 'ngx-check-permission';
constructor( public permission: NgxCheckPermissionService ) {}
Getting all the permission status is async process use async function in order to receive the response
async ngOnInit() {
await this.checkPermissions();
}
public async checkPermissions() {
await this.permission.getAllPermissions().then((permisssions) => {
console.log(permisssions);
});
}
[{
"permissionName": "geolocation",
"state": "prompt"
}, {
"permissionName": "notifications",
"state": "prompt"
}, {
"permissionName": "midi",
"state": "granted"
}, {
"permissionName": "camera",
"state": "prompt"
}, {
"permissionName": "microphone",
"state": "prompt"
}, {
"permissionName": "background-fetch",
"state": "granted"
}, {
"permissionName": "background-sync",
"state": "granted"
}, {
"permissionName": "persistent-storage",
"state": "prompt"
}, {
"permissionName": "accelerometer",
"state": "granted"
}, {
"permissionName": "gyroscope",
"state": "granted"
}, {
"permissionName": "magnetometer",
"state": "granted"
}, {
"permissionName": "display-capture",
"state": "prompt"
}]
Permission list:
'geolocation', 'notifications', 'push', 'midi', 'camera', 'microphone', 'speaker', 'device-info', 'background-fetch', 'background-sync', 'bluetooth', 'persistent-storage', 'ambient-light-sensor', 'accelerometer', 'gyroscope', 'magnetometer', 'clipboard', 'display-capture', 'nfc'
To use this package as a service npm i ngx-check-permission
install this on the root angular project .
Note: Don't forget to run this commend
npm i ngx-check-permission
on root folder or else it will throw error.
No vulnerabilities found.
No security vulnerabilities found.