How to use the t function from tar

Find comprehensive JavaScript tar.t code examples handpicked from public code repositorys.

50
51
52
53
54
55
56
57
58
59
const bundled = new Set()
let totalEntries = 0
let totalEntrySize = 0

// reads contents of tarball
const stream = tar.t({
  onentry (entry) {
    totalEntries++
    totalEntrySize += entry.size
    const p = entry.path
fork icon0
star icon0
watch icon1

+ 3 other calls in file

218
219
220
221
222
223
224
225
226
227
)
const files = []
const bundled = new Set()
let totalEntries = 0
let totalEntrySize = 0
return tar.t({
  file: target,
  onentry (entry) {
    totalEntries++
    totalEntrySize += entry.size
fork icon0
star icon0
watch icon0

61
62
63
64
65
66
67
68
69
70
function extractWithTar(tarPath, destination, onProgress) {
  const symlinks = [];

  let total = 0;
  // This takes a few seconds, but lets us show the progress
  tar.t({
    sync: true,
    file: tarPath,
    onentry() {
      total += 1;
fork icon0
star icon0
watch icon0