Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
fs-chunk-store
Advanced tools
Readme
npm install fs-chunk-store
var FSChunkStore = require('fs-chunk-store')
var chunks = new FSChunkStore(10, {
path: '/tmp/my_file', // optional: path to file (default: temp file will be used)
length: 100 // optional: file length in bytes (default: file expands based on `put`s)
})
var FSChunkStore = require('fs-chunk-store')
var chunks = new FSChunkStore(10, {
files: [
{ path: 'folder/file1.txt', length: 12 },
{ path: 'folder/file2.txt', length: 8 },
{ path: 'folder/file3.txt', length: 30 }
],
path: 'C:/user/' // optional: if specified the file paths will be treated as relative, not absolute
})
Specifying a path to the store will create a folder in that path, and on destroy, will delete the folder along with all it's contents
chunks.put(0, Buffer.from('0123456789'), function (err) {
if (err) throw err
chunks.get(0, function (err, chunk) {
if (err) throw err
console.log(chunk) // '0123456789' as a buffer
chunks.close(function (err) {
if (err) throw err
console.log('/tmp/my_file file descriptor is closed')
chunks.destroy(function (err) {
if (err) throw err
console.log('/tmp/my_file file is deleted')
})
})
})
})
MIT. Copyright (c) Feross Aboukhadijeh.
FAQs
Filesystem (fs) chunk store that is abstract-chunk-store compliant
The npm package fs-chunk-store receives a total of 2,951 weekly downloads. As such, fs-chunk-store popularity was classified as popular.
We found that fs-chunk-store demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.