'use strict' // turn tar(1) style args like `C` into the more verbose things like `cwd` const argmap = new Map([ ['C', 'cwd'], ['f', 'file'], ['z', 'gzip'], ['P', 'preservePaths'], ['U', 'unlink'], ['strip-components', 'strip'], ['stripComponents', 'strip'], ['keep-newer', 'newer'], ['keepNewer', 'newer'], ['keep-newer-files', 'newer'], ['keepNewerFiles', 'newer'], ['k', 'keep'], ['keep-existing', 'keep'], ['keepExisting', 'keep'], ['m', 'noMtime'], ['no-mtime', 'noMtime'], ['p', 'preserveOwner'], ['L', 'follow'], ['h', 'follow'] ]) const parse = module.exports = opt => opt ? Object.keys(opt).map(k => [ argmap.has(k) ? argmap.get(k) : k, opt[k] ]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {}
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
buffer.js | File | 283 B | 0644 |
|
create.js | File | 2.32 KB | 0644 |
|
extract.js | File | 2.76 KB | 0644 |
|
header.js | File | 8.83 KB | 0644 |
|
high-level-opt.js | File | 772 B | 0644 |
|
large-numbers.js | File | 2.16 KB | 0644 |
|
list.js | File | 3.08 KB | 0644 |
|
mkdir.js | File | 5.06 KB | 0644 |
|
mode-fix.js | File | 277 B | 0644 |
|
pack.js | File | 9.39 KB | 0644 |
|
parse.js | File | 11.86 KB | 0644 |
|
pax.js | File | 3.97 KB | 0644 |
|
read-entry.js | File | 2.61 KB | 0644 |
|
replace.js | File | 5.36 KB | 0644 |
|
types.js | File | 1.07 KB | 0644 |
|
unpack.js | File | 16.46 KB | 0644 |
|
update.js | File | 852 B | 0644 |
|
warn-mixin.js | File | 309 B | 0644 |
|
winchars.js | File | 533 B | 0644 |
|
write-entry.js | File | 11.77 KB | 0644 |
|