budelman / js-asset-management

A JavaScript Library for battery, connection and DPI checks to manage your assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS Asset Management

This is a small JavaScript library to help asset management in the browser. Whether it's images, JavaScript files, or anything you want to conditionally load based on Connection speed and Battery life.

The API

Manage.connection will return "good" or "bad" (over 3mbs is good)

Manage.battery will return "good" or "bad" (over 25% is good)

Manage.pixelRatio will return "good" or "bad" (2:1 is good)

About

A JavaScript Library for battery, connection and DPI checks to manage your assets