nfclibrary
Advanced tools
Comparing version 1.0.4 to 1.0.5
14
index.js
@@ -1,4 +0,4 @@ | ||
let fetch; | ||
let axios; | ||
try { | ||
fetch = require('node-fetch'); | ||
axios = require('axios'); | ||
} catch (error) { | ||
@@ -42,2 +42,3 @@ console.log(error.message) | ||
function Reader(query) { | ||
/* | ||
const url = `https://www.naflouille-creations.com/public/library/${query}.svg`; | ||
@@ -56,4 +57,11 @@ return fetch(url) | ||
} | ||
}); | ||
});*/ | ||
axios.get(`https://www.naflouille-creations.com/public/library/${query}.svg`) | ||
.then(response => { | ||
return response.data; | ||
}) | ||
.catch(error => console.error(error)); | ||
}; | ||
Reader('download') | ||
@@ -60,0 +68,0 @@ module.exports = { |
{ | ||
"name": "nfclibrary", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A node module to query any icon from the Naflouille Creations projects. ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
3117
67
0