All Projects → logaretm → vue-adaptive-utils

logaretm / vue-adaptive-utils

Licence: MIT License
Deliver empathetic experiences to your users by adapting to their capabilities

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to vue-adaptive-utils

React Adaptive Hooks
Deliver experiences best suited to a user's device and network constraints
Stars: ✭ 4,750 (+7950.85%)
Mutual labels:  cpu, memory, loading, adaptive-loading
Pm2 Server Monit
Monitor server CPU / Memory / Process / Zombie Process / Disk size / Security Packages / Network Input / Network Output
Stars: ✭ 247 (+318.64%)
Mutual labels:  cpu, memory
Pubg mobile memory hacking examples
Pubg Mobile Emulator Gameloop Memory Hacking C++ code examples. Ex: Name, Coord, Bones, Weapons, Items, Box, Drop etc.
Stars: ✭ 224 (+279.66%)
Mutual labels:  cpu, memory
doc
Get usage and health data about your Node.js process.
Stars: ✭ 17 (-71.19%)
Mutual labels:  cpu, memory
Sysstat
Performance monitoring tools for Linux
Stars: ✭ 2,055 (+3383.05%)
Mutual labels:  cpu, memory
Wgcloud
linux运维监控工具,支持系统信息,内存,cpu,温度,磁盘空间及IO,硬盘smart,系统负载,网络流量等监控,API接口,大屏展示,拓扑图,进程监控,端口监控,docker监控,文件防篡改,日志监控,数据可视化,web ssh,堡垒机,指令下发批量执行,linux面板,探针,故障告警
Stars: ✭ 2,669 (+4423.73%)
Mutual labels:  cpu, memory
nodejs
Node.js in-process collectors for Instana
Stars: ✭ 66 (+11.86%)
Mutual labels:  cpu, memory
Iglance
Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
Stars: ✭ 1,358 (+2201.69%)
Mutual labels:  cpu, memory
kotary
Managing Kubernetes Quota with confidence
Stars: ✭ 85 (+44.07%)
Mutual labels:  cpu, memory
cpu-memory-monitor
CPU & Memory Monitor, auto dump.
Stars: ✭ 26 (-55.93%)
Mutual labels:  cpu, memory
stress
Single-purpose tools to stress resources
Stars: ✭ 24 (-59.32%)
Mutual labels:  cpu, memory
Touch Bar Istats
Show CPU/GPU/MEM temperature on Touch Bar with BetterTouchTool!
Stars: ✭ 141 (+138.98%)
Mutual labels:  cpu, memory
Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+2777.97%)
Mutual labels:  cpu, memory
Ios Monitor Platform
📚 iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理
Stars: ✭ 2,316 (+3825.42%)
Mutual labels:  cpu, memory
Server Stats
Statsy is a easy to use open source PHP tool for developers, that allows you to return various types of information about your server.
Stars: ✭ 101 (+71.19%)
Mutual labels:  cpu, memory
hardware
Get CPU, Memory and Network informations of the running OS and its processes
Stars: ✭ 70 (+18.64%)
Mutual labels:  cpu, memory
psutil
Cross-platform lib for process and system monitoring in Python
Stars: ✭ 8,488 (+14286.44%)
Mutual labels:  cpu, memory
Rainbarf
it's like Rainmeter, but for CLI!
Stars: ✭ 1,087 (+1742.37%)
Mutual labels:  cpu, memory
Xfce4 Genmon Scripts
🐭 XFCE panel generic monitor scripts
Stars: ✭ 69 (+16.95%)
Mutual labels:  cpu, memory
cpu monitor
ROS node that publishes all nodes' CPU and memory usage
Stars: ✭ 52 (-11.86%)
Mutual labels:  cpu, memory

vue-adaptive-utils

Deliver empathetic experiences to your users by adapting to their capabilities

codecov Build Status Codacy Badge npm npm Average time to resolve an issue Percentage of issues still open


What is this

Inspired by react-adaptive-hooks, and a continuation of my work in vue-use-web.

This is a collection of Vue 3.0 composition API functions and utilties to allow your apps to adapt your user's:

  • Network conditions.
  • Battery Status.
  • CPU Cores.
  • Device Memory.

I have iterated on this idea multiple times, once in my article: Resource-Adaptive Vue Apps which discussed this idea prior to the introduction of the composition API, I have enhanced the idea even more in my work in vue-use-web.

With the Vue 3.0 composition API introduction, this is a perfect way to consume such functionalities into your components. This library is aimed to Vue 3.0 and already working with the Alpha releases.

Why

This is not "yet another web APIs wrappers for Vue's upcoming composition API", this project aims to focus on only the APIs that allow you to tailor your website experience based on various factors like network status, device memory and more. It allows you to build "adaptive" vue applications that are aware of your users devices limitation and to be more empathetic towards them.

This library aims to bring value with those composition functions, not only mirroring the native web APIs that's underneath.

Install

yarn add vue-adaptive-utils

# or

npm i vue-adaptive-utils --save

Usage

Import the composition function(s) that you will use:

import { useNetworkStatus } from 'vue-adaptive-utils';
import { useBattery } from 'vue-adaptive-utils';
import { useHardwareConcurrency } from 'vue-adaptive-utils';
import { useMemoryStatus } from 'vue-adaptive-utils';

All of the composition functions return an isSupported boolean ref to indicate if the API is supported or not.

All the values exposed are read only and cannot be mutated.

Network Status

This is a compounded API, meaning it collects various information from multiple APIs, them being the Connection API and online/offline events.

Partial Compatibility: The isSupported flag here refers to the availability of the Connection API, the isOnline and offlineAt properties should be available in all browsers.

import { useNetworkStatus } from 'vue-adaptive-utils';

const {
  isOnline,
  saveData,
  offlineAt,
  downlink,
  downlinkMax,
  effectiveConnectionType,
  networkType,
  isSupported
} = useNetworkStatus();

Battery Status

This is an experimental API and is only available on Chrome at the moment.

import { useBattery } from 'vue-adaptive-utils';

const { charging, chargingTime, dischargingTime, level, isSupported } = useBattery();

Hardware Concurrency (CPU Cores)

import { useHardwareConcurrency } from 'vue-adaptive-utils';

const { concurrency, isSupported } = useHardwareConcurrency();

Memory Status

This is a compounded API, meaning it collects various information from multiple APIs, mainly the navigator.deviceMemory and navigator.performance.

import { useHardwareConcurrency } from 'vue-adaptive-utils';

const { deviceMemory, totalJSHeapSize, usedJSHeapSize, jsHeapSizeLimit, isSupported } = useMemoryStatus();

Browser Support

  • Battery API is only available on Chrome.
  • Connection API is available on Chrome 61+ and Firefox.
  • Device Memory is available on Chrome 63+.
  • Performance memory API is a non-standard and only available in Chrome 7+, Opera, Chrome for Android 18+, Opera for Android.

📚 Documentation

You can find the docs here.

📜 License

Licensed under the MIT license.

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].