awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
matthewhudson avatar

matthewhudson/current-device

0
View on GitHub↗
3,934 stars·575 forks·TypeScript·MIT·1 vuematthewhudson.github.io/current-device↗

Current Device

current-device is a JavaScript device detection library used to identify operating systems, device categories, and screen orientations within a web browser environment. It serves as a browser environment detector and client-side mapper that translates browser metadata and user-agent strings into predefined device labels and hardware categories.

The library provides tools for executing specific JavaScript logic based on the detected mobile or desktop platform. It also functions as a conditional styling tool and document body class injector, applying descriptive HTML classes to enable device-specific visual styling.

The system includes a screen orientation monitor to detect and react to changes between portrait and landscape modes in real time. It covers general capabilities for user-agent parsing, cross-platform web adaptation, and responsive orientation handling.

Features

  • User Environment Detectors - A system for executing specific JavaScript logic based on the user's current mobile or desktop platform.
  • Client Device Detection - Implements a client-side library to identify device types and operating systems for delivering optimized web experiences.
  • Device and OS Detectors - Identifies the operating system, device category, and screen orientation to trigger logic specific to the user's environment.
  • Device-Conditional Logic - Triggers specific JavaScript actions based on the detected device type, operating system, or current screen orientation.
  • Environment-Specific Execution - Uses JavaScript logic to determine hardware characteristics and execute environment-specific code paths.
  • Execution Path Detection - Detects the runtime environment to trigger specific JavaScript code execution paths based on the user platform.
  • String Parsing - Extracts device and operating system information by analyzing the browser identification string.
  • User-Agent Pattern Matching - Extracts operating system and device categories by matching browser identification strings against predefined regex patterns.
  • Device Detection Utilities - Adds descriptive CSS classes to HTML elements based on the user's operating system, device type, and screen orientation.
  • Screen Orientation Detection - Includes a real-time monitor to detect and react to changes between portrait and landscape screen orientations.
  • Browser Environment Mapping - Maps raw browser metadata to a set of device categories and operating system labels during runtime.
  • Client-Side Environment Mapping - Maps browser metadata and user-agent strings to predefined device labels and hardware categories.
  • User Agent Parsers - Extracts device and operating system information from browser metadata to categorize the user's environment.
  • Conditional CSS Styling - Provides the ability to apply specific CSS styles based on the detected hardware and operating system.
  • CSS Class Utilities - Ships a utility that dynamically injects CSS classes into the document body based on device detection.
  • Device-Specific Styling - Applies different CSS rules based on the user's operating system, device type, or screen orientation for a tailored visual experience.
  • Orientation Change Listeners - Listens for window resize or orientation change events to trigger immediate updates to the environment state.
  • Layout Orientation Recalculation - Executes custom code or updates layouts in real time when a device switches between portrait and landscape viewing modes.
  • State-Based CSS Toggling - Dynamically modifies HTML element classes to adapt layouts for portrait versus landscape viewing modes.
  • CSS Class-Based Styling - Adds descriptive CSS classes to HTML elements based on the detected device and orientation for custom styling.
  • Environment Class Injection - Applies descriptive identifiers to the document body to allow for device-specific CSS targeting.
  • Cross-Platform Web Frameworks - Tailors a website's behavior and appearance to match the specific constraints of different mobile and desktop platforms.
  • Orientation Change Callbacks - Executes a callback function immediately whenever the device switches between landscape and portrait viewing modes.

Historique des stars

Graphique de l'historique des stars pour matthewhudson/current-deviceGraphique de l'historique des stars pour matthewhudson/current-device

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Current Device

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Current Device.
  • arasatasaygin/is.jsAvatar de arasatasaygin

    arasatasaygin/is.js

    9,078Voir sur GitHub↗

    is.js is a JavaScript validation library and data type checker. It provides a suite of utilities to verify whether variables are primitives, arrays, functions, or specific object types. The project allows for the implementation of custom validation logic and the use of naming namespaces to override default rules and regular expressions. It covers a broad range of validation capabilities, including numeric arithmetic properties, date and time analysis for relative and absolute ranges, and string format verification for patterns such as emails, URLs, and IP addresses. The library also includes

    JavaScript
    Voir sur GitHub↗9,078
  • hgoebl/mobile-detect.jsAvatar de hgoebl

    hgoebl/mobile-detect.js

    4,137Voir sur GitHub↗

    mobile-detect.js is a JavaScript library for user agent detection. It analyzes browser request headers to identify hardware types, operating systems, and browser versions. The library includes a client hardware profiler that assigns performance and capability grades to mobile devices based on their characteristics. It also provides tools to apply specific CSS classes to the document body based on detected hardware to enable responsive styling. The project covers broad analysis capabilities, including the detection of mobile phones, tablets, and desktop computers. It extracts operating system

    JavaScript
    Voir sur GitHub↗4,137
  • jenssegers/agentAvatar de jenssegers

    jenssegers/agent

    4,813Voir sur GitHub↗

    This project is a PHP user agent parser and mobile device detector. It analyzes HTTP user agent strings to identify the visitor's web browser, operating system, and device type. The library provides a dedicated integration for the Laravel web framework. It distinguishes between mobile phones, tablets, and desktop computers while identifying web robots and the specific names of search engine crawlers. The tool's capabilities include extracting preferred languages from request headers and verifying specific user agent properties. It uses regular expression pattern matching and static data mapp

    PHP
    Voir sur GitHub↗4,813
  • bowser-js/bowserAvatar de bowser-js

    bowser-js/bowser

    5,739Voir sur GitHub↗

    Bowser is a browser detection library that parses user-agent strings to identify a browser's name, version, rendering engine, and operating system. It functions as a user-agent parser and version constraint checker, extracting structured browser and platform details from raw user-agent strings without external dependencies. The library distinguishes itself by integrating User-Agent Client Hints alongside traditional user-agent data for more accurate browser identification in modern environments. It provides cross-platform browser detection that works consistently across desktop and mobile ope

    JavaScriptbrowserbrowser-detectionbrowser-detector
    Voir sur GitHub↗5,739
Voir les 30 alternatives à Current Device→

Questions fréquentes

Que fait matthewhudson/current-device ?

current-device is a JavaScript device detection library used to identify operating systems, device categories, and screen orientations within a web browser environment. It serves as a browser environment detector and client-side mapper that translates browser metadata and user-agent strings into predefined device labels and hardware categories.

Quelles sont les fonctionnalités principales de matthewhudson/current-device ?

Les fonctionnalités principales de matthewhudson/current-device sont : User Environment Detectors, Client Device Detection, Device and OS Detectors, Device-Conditional Logic, Environment-Specific Execution, Execution Path Detection, String Parsing, User-Agent Pattern Matching.

Quelles sont les alternatives open-source à matthewhudson/current-device ?

Les alternatives open-source à matthewhudson/current-device incluent : arasatasaygin/is.js — is.js is a JavaScript validation library and data type checker. It provides a suite of utilities to verify whether… hgoebl/mobile-detect.js — mobile-detect.js is a JavaScript library for user agent detection. It analyzes browser request headers to identify… jenssegers/agent — This project is a PHP user agent parser and mobile device detector. It analyzes HTTP user agent strings to identify… bowser-js/bowser — Bowser is a browser detection library that parses user-agent strings to identify a browser's name, version, rendering… fomantic/fomantic-ui — Fomantic-UI is a component-based CSS library and frontend design system used to build consistent, responsive user… dodyg/practical-aspnetcore — This project is a comprehensive sample library and implementation guide for ASP.NET Core. It provides a collection of…