Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Efficient and streamable in-memory file format.
Read files and write files efficiently in-memory using this tiny API.
let diskette = require('diskette')
let file = new diskette.File({
blockLength: 20
})
file.append('yo bruh\n')
file.append('i heard you like files\n')
let rest = new File('so i made files in memory that can be piped to just about anything\n')
let out = new diskette.WritableFileStream(file)
let restStream = new diskette.ReadableFileStream(rest)
restStream.pipe(out)
file.append('hope you like it')
file.write(4, 'dude')
let s = new diskette.ReadableFileStream(file)
s.pipe(process.stdout)
yo dude
i heard you like files
so i made files in memory that can be piped to just about anything
hope you like it
Create a new file which has its contents stored in-memory, optionally filled with content
, and with one of the following options:
Note: content
can be omitted.
Writes the content of buffer between the given indices to the given position. If no indices are provided, the enitre content of the buffer is written to file.
Just like file.write
, except that it appends data to the end of the file.
Reads content of file starting at the given position to the given buffer, optionally limited by two indices denoting the start and the end position of the buffer.
Constructs a new readable stream of which data of file can be read. The options are:
-1
to make the chunk as large as possible (possibly the enitre file content). Defaults to -1
.0
.Constructs a new writable stream that writes data to file starting at the given position. The options are:
FAQs
Stream buffers and strings efficiently in-memory
The npm package diskette receives a total of 1 weekly downloads. As such, diskette popularity was classified as not popular.
We found that diskette 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
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.