Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
listener = tcp.createListener((conn) => {
pipe(
conn,
map((x) => Buffer.from(x.toString() + '!')),
conn
)
})
await listener.listen(ma)
listener = tcp.createListener((conn) => {
pipe(
conn,
map((x) => Buffer.from(x.toString() + '!')),
conn
)
})
await listener.listen(ma)
async function createMarkedSet ({ pin, pinManager, refs, repo }) {
const pinsSource = map(({ cid }) => cid, pin.ls())
const pinInternalsSource = (async function * () {
const cids = await pinManager.getInternalBlocks()
yield * cids
})()
const mfsSource = (async function * () {
let mh
try {
mh = await repo.root.get(MFS_ROOT_KEY)
} catch (err) {
if (err.code === ERR_NOT_FOUND) {
log('No blocks in MFS')
return
}
throw err