Socket
Book a DemoInstallSign in
Socket

retinable

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retinable

checks if device have retina display

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

retinable

checks if device have retina display

npm install retinable --save

to require module use

var retinable = require('retinable');

if (retinable()) {
    console.log("Your device have retina display");
}

Browser

<script src="dist/retinable.min.js"></script>
<script>
    if (retinable()) {
        console.log("Your device have retina display");
    }
</script>

Or use an AMD loader (such as RequireJS):

require(['dist/retinable.min.js'], function (Immutable) {
    if (retinable()) {
        console.log("Your device have retina display");
    }
});

retinable.suffix()

return @2x if device have retina display

var imgSrc = "/img/logo" + retinable.suffix() + '.png';

Keywords

retina

FAQs

Package last updated on 14 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts