Gathering detailed insights and metrics for lsr
Gathering detailed insights and metrics for lsr
Gathering detailed insights and metrics for lsr
Gathering detailed insights and metrics for lsr
npm install lsr
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
10 Stars
10 Commits
2 Forks
4 Watching
2 Branches
3 Contributors
Updated on 25 Jan 2020
TypeScript (65.22%)
JavaScript (34.78%)
Cumulative downloads
Total Downloads
Last day
67.5%
608
Compared to previous day
Last week
-23.7%
2,461
Compared to previous week
Last month
175.9%
8,246
Compared to previous month
Last year
121.8%
49,135
Compared to previous year
3
2
Recursive readdir (ls -R
)
npm install lsr
1const {lsrSync, lsrAsync, lsrStream} = require('lsr');
2// Synchronous
3console.dir(lsrSync(__dirname))
4
5// Promise
6lsrAsync(__dirname).then(function (res) {
7 console.dir(res)
8})
9
10// Stream
11lsrStream(__dirname).pipe(getPath()).pipe(process.stdout)
Each file system entry is represented by a Stat object with the additional properties:
name
: the file name (e.g. foo.txt
)path
: the relative path to the file (e.g. ./subdir/foo.txt
). This is always separated by /
regardless of platform.fullPath
: the full path to the file (e.g. c:\\basedir\\foo.txt
or /basedir/foo.txt
). This is separated by the correct path separater for the platform.Recursively lists the files and folders and calls the callback exactly once with the error or null as the first argument and an array of file system entries as the second argument.
Options:
true
to include that entry and any sub-entries in the result and false
otherwisepath
property of the file system entry (before the call to fs.stat
) as its only argument and should return true
to include that entry and any sub-entries in the result and false
otherwiseIf the callback is ommitted, a promise is returned instead.
Recursively lists the files and folders and returns an array of file system entries.
Options:
true
to include that entry and any sub-entries in the result and false
otherwisepath
property of the file system entry (before the call to fs.stat
) as its only argument and should return true
to include that entry and any sub-entries in the result and false
otherwiseRecursively lists the files and folders and returns a stream of file system entries.
Options:
true
to include that entry and any sub-entries in the result and false
otherwisepath
property of the file system entry (before the call to fs.stat
) as its only argument and should return true
to include that entry and any sub-entries in the result and false
otherwisereaddir
and stat
while it waits for the consuming stream to catch upMIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/10 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
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