All Projects → maoosi → device.js

maoosi / device.js

Licence: MIT license
🧬 Reactive library to observe essential browser and device properties.

Programming Languages

typescript
32286 projects
Vue
7211 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to device.js

MinutiaeNet
Code and models for paper "Robust Minutiae Extractor: Integrating Deep Networks and Fingerprint Domain Knowledge" at International Conference on Biometrics (ICB) 2018
Stars: ✭ 93 (+220.69%)
Mutual labels:  detection, orientation
Bugz
🐛 Composable User Agent Detection using Ramda
Stars: ✭ 15 (-48.28%)
Mutual labels:  device, os
detect-gpu
Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications.
Stars: ✭ 749 (+2482.76%)
Mutual labels:  device, detection
Parser Javascript
Browser sniffing gone too far — A useragent parser library for JavaScript
Stars: ✭ 66 (+127.59%)
Mutual labels:  device, detection
Detect Gpu
Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications.
Stars: ✭ 460 (+1486.21%)
Mutual labels:  device, detection
Device Detector Js
A precise user agent parser and device detector written in TypeScript
Stars: ✭ 193 (+565.52%)
Mutual labels:  device, os
mbed-tools
⚠️ Beta Status: New command line tooling for Mbed OS
Stars: ✭ 40 (+37.93%)
Mutual labels:  os
HKHacking
No description or website provided.
Stars: ✭ 29 (+0%)
Mutual labels:  device
lkm-sandbox
Collection of Linux Kernel Modules and PoC to discover, learn and practice Linux Kernel Development
Stars: ✭ 36 (+24.14%)
Mutual labels:  device
JBC SolderingStation
JBC_SolderingStation
Stars: ✭ 63 (+117.24%)
Mutual labels:  device
timeline
Timeline - A photo organizer
Stars: ✭ 39 (+34.48%)
Mutual labels:  detection
AnticheatJS
Javascript Anti Cheats 101
Stars: ✭ 81 (+179.31%)
Mutual labels:  detection
Ultra
An operating system that doesn't try to be UNIX. Made completely from scratch with its own bootloader. 😊
Stars: ✭ 48 (+65.52%)
Mutual labels:  os
VideoRecognitionTracking
Real time object or face detection recognition and tracking in video. The Full end-to-end project.
Stars: ✭ 36 (+24.14%)
Mutual labels:  detection
cryptctl
A disk encryption utility that helps setting up LUKS-based disk encryption using randomly generated keys, and keeps all keys on a dedicated key server.
Stars: ✭ 23 (-20.69%)
Mutual labels:  os
nnDetection
nnDetection is a self-configuring framework for 3D (volumetric) medical object detection which can be applied to new data sets without manual intervention. It includes guides for 12 data sets that were used to develop and evaluate the performance of the proposed method.
Stars: ✭ 355 (+1124.14%)
Mutual labels:  detection
powerai-vision-object-detection
Use deep learning to create a model and a REST endpoint to allow your app to detect, locate and count your product on store shelves
Stars: ✭ 93 (+220.69%)
Mutual labels:  detection
gradle-cpd-plugin
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Stars: ✭ 88 (+203.45%)
Mutual labels:  detection
Onyx
UNIX-like operating system written in C and C++
Stars: ✭ 52 (+79.31%)
Mutual labels:  os
R-CNN LIGHT
Regional-Convolution Neural Network for blink detection based on contouring.
Stars: ✭ 66 (+127.59%)
Mutual labels:  detection

🧬 Device.js

Reactive library to observe essential browser and device properties.

⚠️ Version 2 is not backward compatible with version 1. Check the Changelog for more details.

✔️ Features detected

  • Browser name & version chrome, safari, firefox, facebook, instagram, edge, ie, opera, phantomjs
  • Browser features webp, webrtc, webgl, pwa
  • Device orientation portrait, landscape
  • Device type desktop, mobile, tablet, tv
  • Device OS android, ios, windows, macos
  • Viewport dimensions width, height

📦 Installation

yarn add @maoosi/device.js

🚀 Usage

Basic usage:

This code will log viewportWidth after every viewport resize, throttled to 200 ms:

import { device, watch } from '@maoosi/device.js'

watch(async() => {
    console.log(device.viewportWidth)
})

device is a reactive proxied object that can be observed and exposes the following properties:

interface device {
    deviceOS: string | null
    deviceType: string | null
    deviceOrientation: string | null
    browser: string | null
    browserVersion: string | null
    viewportHeight: number | null
    viewportWidth: number | null
    isBrowserEvergreen: boolean | null
    isPWA: boolean | null
    isSupportedWebP: boolean | null
    isSupportedWebGL: boolean | null
    isSupportedWebRTC: boolean | null
}

Using Vue.js:

Since device is a reactive proxied object, Vue.js can observe changes without needing to use the watch method:

<template>
    <pre>{{ deviceInfo }}</pre>
</template>

<script>
import { device } from '@maoosi/device.js'

export default {
    data() {
        return { deviceInfo: device }
    }
}
</script>

🧪 Run the playground

First, make sure you have Vue.js Instant Prototyping service installed: https://cli.vuejs.org/guide/prototyping.html

Then from your terminal:

yarn playground

🤝 Contributing

Contributions, issues and feature requests are welcome.

📝 License

Copyright © 2021 maoosi.

This project is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].