
Product
Introducing Immutable Scans
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.
lock-em-sock-em
Advanced tools
atomic, cross-platform tcp domain servers & sockets
npm i lock-em-sock-em
const { createServer, connect, lockemSockem } = require('lock-em-sock-em')
const id = 'lock-em-sock-em'
const server = await createServer(id)
server.on('connection', async (socket) => {
let str = ''
for await (const buf of socket) str += buf
console.log(str)
})
const socket = await connect(id)
socket.write(Buffer.from(id))
socket.end()
const { acquired } = await lockemSockem(id)
console.log('acquired file lock?', acquired)
const server = await createServer(id)server is an instance of net.Server()
const socket = await connect(id)socket is an instance of net.Socket()
const { handle, lock, acquired, sock } = await lockemSockem(id)handle is an instance of fs.FileHandlelock is the String path of the file lockacquired is a Boolean indicating whether the file lock was successfully acquiredsock is the String path of the domain socketFAQs
atomic, cross-platform tcp domain servers & sockets
We found that lock-em-sock-em 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.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.