mobile-friendly-test
v1.0.1
Published
Google's Mobile Friendly Test API for NodeJS
Downloads
6
Readme
mobile-friendly-test
Check if a specific URL is mobile friendly
Install
$ npm install --save mobile-friendly-test
Usage Examples
const mobileFriendlyTest = require('mobile-friendly-test')('api-key');
mobileFriendlyTest.run('https://research.google.com/', function (err, results) {
if (err) {
return console.log(err);
}
console.log(results);
/* Example response
{
testStatus: {
status: 'COMPLETE'
},
mobileFriendliness: 'NOT_MOBILE_FRIENDLY',
mobileFriendlyIssues: [
{
rule: 'SIZE_CONTENT_TO_VIEWPORT'
}
]
}
/*
})
License
MIT © Gabriel Montalvo