Gathering detailed insights and metrics for extract-base-iterator
Gathering detailed insights and metrics for extract-base-iterator
Gathering detailed insights and metrics for extract-base-iterator
Gathering detailed insights and metrics for extract-base-iterator
Base iterator for extract iterators like tar-iterator and zip-iterator
npm install extract-base-iterator
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (98.19%)
JavaScript (1.81%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
205 Commits
2 Watchers
10 Branches
1 Contributors
Updated on Jul 09, 2025
Latest Version
2.2.3
Package Id
extract-base-iterator@2.2.3
Unpacked Size
124.97 kB
Size
18.36 kB
File Count
110
NPM Version
11.4.2
Node Version
24.3.0
Published on
Jul 08, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Base iterator for extract iterators like tar-iterator and zip-iterator.
// asyncIterator
1var assert = require('assert'); 2var BaseIterator = require('extract-base-iterator')); 3 4// extend BaseIterator (see tests, tar-iterator, zip-iterator for examples) 5 6(async function() { 7 var iterator = new YourIterator(); 8 9 try { 10 const links = []; 11 for await (const entry of iterator) { 12 if (entry.type === 'link') links.unshift(entry); 13 else if (entry.type === 'symlink') links.push(entry); 14 else await entry.create(dest, options); 15 } 16 17 // create links after directories and files 18 for (const entry of links) await entry.create(dest, options); 19 } catch (err) { 20 } 21 22 iterator.destroy(); 23 iterator = null; 24})();
// Async / Await
1var assert = require('assert'); 2var BaseIterator = require('extract-base-iterator')); 3 4// extend BaseIterator (see tests, tar-iterator, zip-iterator for examples) 5 6var iterator = new YourIterator(); 7 8// one by one 9(async function() { 10 let iterator = new YourIterator(); 11 12 try { 13 const links = []; 14 for await (const entry of iterator) { 15 if (entry.type === 'link') links.unshift(entry); 16 else if (entry.type === 'symlink') links.push(entry); 17 else await entry.create(dest, options); 18 } 19 20 // create links after directories and files 21 for (const entry of links) await entry.create(dest, options); 22 } catch (err) { 23 } 24 25 iterator.destroy(); 26 iterator = null; 27})(); 28 29// infinite concurrency 30(async function() { 31 let iterator = new YourIterator(); 32 33 try { 34 const links = []; 35 await iterator.forEach( 36 async function (entry) { 37 if (entry.type === 'link') links.unshift(entry); 38 else if (entry.type === 'symlink') links.push(entry); 39 else await entry.create(dest, options); 40 }, 41 { concurrency: Infinity } 42 ); 43 44 // create links after directories and files 45 for (const entry of links) await entry.create(dest, options); 46 } catch (err) { 47 aseert.ok(!err); 48 } 49 50 iterator.destroy(); 51 iterator = null; 52})();
// Callbacks
1var assert = require('assert'); 2var Queue = require('queue-cb'); 3var BaseIterator = require('extract-base-iterator')); 4 5// extend BaseIterator (see tests, tar-iterator, zip-iterator for examples) 6 7var iterator = new YourIterator(); 8 9// one by one 10var links = []; 11iterator.forEach( 12 function (entry, callback) { 13 if (entry.type === 'link') { 14 links.unshift(entry); 15 callback(); 16 } else if (entry.type === 'symlink') { 17 links.push(entry); 18 callback(); 19 } else entry.create(dest, options, callback); 20 }, 21 { callbacks: true, concurrency: 1 }, 22 function (err) { 23 24 // create links after directories and files 25 var queue = new Queue(); 26 for (var index = 0; index < links.length; index++) { 27 var entry = links[index]; 28 queue.defer(entry.create.bind(entry, dest, options)); 29 } 30 queue.await(callback); 31 32 iterator.destroy(); 33 iterator = null; 34 } 35);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More