
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
dl6.require() delay the loading until the first time you call it.
dl6.require() reload your module automatically when the module is modified !
We use the es6 proxy and fs.watch() to implement the dl6 package.
$ npm i dl6
File: dl6ex.js
const dl6 = require('dl6')
const fs = require('fs')
function sleep (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
async function main () {
fs.writeFileSync('cat.js', `
module.exports = {
say: () => 'meow'
}
`)
const cat = dl6.dload(__dirname, 'cat')
console.log('cat=', cat)
console.log(cat.say())
console.log('cat=', cat)
fs.writeFileSync('cat.js', `
module.exports = {
say: () => 'hello'
}
`)
await sleep(1000)
console.log(cat.say())
dl6.end()
}
main().catch((error) => console.log(error))
Run:
$ node dl6ex.js
cat= {}
call D:\ccc\code\js\dl6\example\cat : say
meow
cat= { say: [Function: say] }
call D:\ccc\code\js\dl6\example\cat : say
hello
FAQs
Dynamic Loading Module (by ES6 Proxy)
We found that dl6 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.