rmr-lib
v0.0.21
Published
π
Downloads
2
Readme
rmr-lib
A well-tested & well-documented library of code for working with internet metadata:
const
RMR = require('rmr-lib'),
mime = RMR.mime.fromPath('script.js')), // 'text/javascript'
ext = RMR.mime.extensionFor('application/json'), // 'json'
isURL = RMR.url.isA('https://google.com'), // true
RMR.meta.retrieve('http://readmeansrun.com').then(function(data) {
/*{
"bytes" : 294,
"url" : "https://readmeansrun.com",
"mime" : "text/html",
"title": "READMEANSRUN",
"keywords": "rmr",
"description": "READMEANSRUN makes websites and takes pictures",
"apple-touch-icon": {
"mime": "image/png",
"url": "https://readmeansrun.com/apple-touch-icon.png"
},
"og" : {
"title": "READMEANSRUN",
"email": "[email protected]",
"description": "READMEANSRUN makes websites and takes pictures",
"image": {
"mime": "image/png",
"url": "https://readmeansrun.com/assets/img/og-image.png"
}
},
"favicon": {
"mime": "image/x-icon",
"url": "https://readmeansrun.com/favicon.ico"
}
}*/
}).catch(function(err)) {
console.log('π«', err);
};
View the inline documentation for more info.