REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 1.91 KB
Close
//lib/node_modules/npm/node_modules/cacache/put.js
Text
Base64
'use strict' const figgyPudding = require('figgy-pudding') const index = require('./lib/entry-index') const memo = require('./lib/memoization') const write = require('./lib/content/write') const to = require('mississippi').to const PutOpts = figgyPudding({ algorithms: { default: ['sha512'] }, integrity: {}, memoize: {}, metadata: {}, pickAlgorithm: {}, size: {}, tmpPrefix: {}, single: {}, sep: {}, error: {}, strict: {} }) module.exports = putData function putData (cache, key, data, opts) { opts = PutOpts(opts) return write(cache, data, opts).then(res => { return index.insert( cache, key, res.integrity, opts.concat({ size: res.size }) ).then(entry => { if (opts.memoize) { memo.put(cache, entry, data, opts) } return res.integrity }) }) } module.exports.stream = putStream function putStream (cache, key, opts) { opts = PutOpts(opts) let integrity let size const contentStream = write.stream( cache, opts ).on('integrity', int => { integrity = int }).on('size', s => { size = s }) let memoData let memoTotal = 0 const stream = to((chunk, enc, cb) => { contentStream.write(chunk, enc, () => { if (opts.memoize) { if (!memoData) { memoData = [] } memoData.push(chunk) memoTotal += chunk.length } cb() }) }, cb => { contentStream.end(() => { index.insert(cache, key, integrity, opts.concat({ size })).then(entry => { if (opts.memoize) { memo.put(cache, entry, Buffer.concat(memoData, memoTotal), opts) } stream.emit('integrity', integrity) cb() }) }) }) let erred = false stream.once('error', err => { if (erred) { return } erred = true contentStream.emit('error', err) }) contentStream.once('error', err => { if (erred) { return } erred = true stream.emit('error', err) }) return stream }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
lib
DIR
-
drwxr-xr-x
2024-03-03 22:36:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
locales
DIR
-
drwxr-xr-x
2024-03-03 22:36:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CHANGELOG.md
22.31 KB
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
en.js
58 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
es.js
58 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get.js
6.71 KB
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
58 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE.md
755 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ls.js
121 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
3.32 KB
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
put.js
1.91 KB
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.es.md
20.48 KB
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
20.00 KB
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rm.js
661 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
verify.js
55 B
lrw-r--r--
2021-03-10 14:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).