This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
function getDependencies(packageName) { | |
const url = `https://registry.npmjs.org/${packageName}/latest`; | |
return fetch(url).then((response) => { | |
return response.json(); | |
}).catch(() => { | |
return []; | |
}).then((body) => { | |
return Array.from(Object.keys(body.dependencies)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
async function getDependencies(packageName) { | |
const url = `https://registry.npmjs.org/${packageName}/latest`; | |
try { | |
const response = await fetch(url); | |
const body = await response.json(); | |
return Array.from(Object.keys(body.dependencies)); | |
} catch (err) { | |
return []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
async function getDependencies(packageName) { | |
const url = `https://registry.npmjs.org/${packageName}/latest`; | |
try { | |
const response = await fetch(url); | |
const body = await response.json(); | |
return Array.from(Object.keys(body.dependencies)); | |
} catch (err) { | |
return []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
async function getDependencies(packageName) { | |
const url = `https://registry.npmjs.org/${packageName}/latest`; | |
try { | |
const response = await fetch(url); | |
const body = await response.json(); | |
return Object.keys(body.dependencies); | |
} catch (err) { | |
return []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button onclick="_pcq.push(['triggerOptIn']);"> | |
GET NOTIFICATIONS | |
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
navigator.serviceWorker | |
.getRegistrations() | |
.then(function (registrations) { | |
for (let registration of registrations) { | |
registration.unregister(); | |
} | |
}) | |
.catch(function (err) { | |
console.log("Service Worker registration failed: ", err); | |
}); |