REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 896 B
Close
/opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/tar/node_modules/minipass/bench/lib/numbers.js
Text
Base64
'use strict' const stream = require('stream') const numbers = new Array(1000).join(',').split(',').map((v, k) => k) let acc = '' const strings = numbers.map(n => acc += n) const bufs = strings.map(s => new Buffer(s)) const objs = strings.map(s => ({ str: s })) module.exports = class Numbers { constructor (opt) { this.objectMode = opt.objectMode this.encoding = opt.encoding this.ii = 0 this.done = false } pipe (dest) { this.dest = dest this.go() return dest } go () { let flowing = true while (flowing) { if (this.ii >= 1000) { this.dest.end() this.done = true flowing = false } else { flowing = this.dest.write( (this.objectMode ? objs : this.encoding ? strings : bufs)[this.ii++]) } } if (!this.done) this.dest.once('drain', _ => this.go()) } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
extend-minipass.js
220 B
lrw-r--r--
2021-09-28 11:28:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
extend-through2.js
233 B
lrw-r--r--
2021-09-28 11:28:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
extend-transform.js
230 B
lrw-r--r--
2021-09-28 11:28:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
nullsink.js
216 B
lrw-r--r--
2021-09-28 11:28:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
numbers.js
896 B
lrw-r--r--
2021-09-28 11:28:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
timer.js
387 B
lrw-r--r--
2021-09-28 11:28:37
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).