Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-res

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-res - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

12

cli.js
#!/usr/bin/env node
'use strict';
var meow = require('meow');

@@ -11,15 +10,10 @@ var getRes = require('./');

' $ get-res'
].join('\n')
]
});
getRes(function (err, res) {
if (err) {
console.error(err.message);
process.exit(1);
}
getRes().then(function (res) {
res.forEach(function (r, i) {
i = i + 1;
i++;
console.log(i + '. ' + r.item + ' (' + r.percent + ')');
});
});
'use strict';
var w3counter = require('w3counter');
module.exports = function (cb) {
w3counter('res', function (err, data) {
if (err) {
cb(err);
return;
}
cb(null, data);
});
module.exports = function () {
return w3counter('res');
};
{
"name": "get-res",
"version": "1.1.0",
"version": "2.0.0",
"description": "Get ten most popular screen resolutions",

@@ -19,3 +19,3 @@ "license": "MIT",

"scripts": {
"test": "node test.js"
"test": "xo && ava"
},

@@ -32,8 +32,14 @@ "files": [

"dependencies": {
"meow": "^3.0.0",
"w3counter": "^1.0.3"
"meow": "^3.3.0",
"w3counter": "^2.0.0"
},
"devDependencies": {
"ava": "^0.0.4"
"ava": "^0.2.0",
"xo": "*"
},
"xo": {
"ignore": [
"test/test.js"
]
}
}

@@ -16,8 +16,8 @@ # get-res [![Build Status](http://img.shields.io/travis/kevva/get-res.svg?style=flat)](https://travis-ci.org/kevva/get-res)

```js
var getRes = require('get-res');
const getRes = require('get-res');
getRes(function (err, data) {
getRes().then(data => {
console.log(data);
// => [{item: '1366x768', percent: '20.34%'}, {item: '1280x800', percent: '9.23%'}, ...]
})
});
```

@@ -28,17 +28,7 @@

### getRes(callback)
### getRes()
Gets ten most popular screen resolutions from [w3counter](http://www.w3counter.com/globalstats.php).
Gets ten most popular screen resolutions from [w3counter](http://www.w3counter.com/globalstats.php). Returns a promise that resolves to an array containing the results.
#### callback(err, data)
Type: `function`
##### data
Type: `array`
An array of objects containing the ten most popular resolutions.
## CLI

@@ -45,0 +35,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc