Gathering detailed insights and metrics for @zhenyu925/filing-cabinet
Gathering detailed insights and metrics for @zhenyu925/filing-cabinet
Gathering detailed insights and metrics for @zhenyu925/filing-cabinet
Gathering detailed insights and metrics for @zhenyu925/filing-cabinet
Get the file location associated with a dependency/partial's path
npm install @zhenyu925/filing-cabinet
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
85 Stars
290 Commits
44 Forks
3 Watchers
2 Branches
21 Contributors
Updated on Jun 16, 2025
Latest Version
2.5.6
Package Id
@zhenyu925/filing-cabinet@2.5.6
Unpacked Size
16.78 kB
Size
5.77 kB
File Count
8
NPM Version
6.11.2
Node Version
10.15.0
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
Get the file associated with a dependency/partial's path
npm install --save filing-cabinet
1 2var cabinet = require('filing-cabinet'); 3 4var result = cabinet({ 5 partial: 'somePartialPath', 6 directory: 'path/to/all/files', 7 filename: 'path/to/parent/file', 8 ast: {}, // an optional AST representation of `filename` 9 // Only for JavaScript files 10 config: 'path/to/requirejs/config', 11 webpackConfig: 'path/to/webpack/config', 12 nodeModulesConfig: { 13 entry: 'module' 14 }, 15 tsConfig: 'path/to/typescript/config' 16}); 17 18console.log(result); // /absolute/path/to/somePartialPath
partial
: the dependency pathdirectory
: the path to all filesfilename
: the path to the file containing the partial
ast
: (optional) the parsed AST for filename
.config
: (optional) requirejs config for resolving aliased JavaScript moduleswebpackConfig
: (optional) webpack config for resolving aliased JavaScript modulesnodeModulesConfig
: (optional) config for resolving entry file for node_modules. This value overrides the main
attribute in the package.json file; used in conjunction with the packageFilter of the resolve
package.tsConfig
: (optional) path to a typescript configuration. Could also be an object representing a pre-parsed typescript config.noTypeDefinitions
: (optional) For typescript files, whether to prefer *.js
over *.d.ts
.By default, filing-cabinet provides support for the following languages:
.scss
and .sass
), Stylus (.styl
), and Less (.less
)You can register resolvers for new languages via cabinet.register(extension, resolver)
.
extension
: the extension of the file that should use the custom resolver (ex: '.py', '.php')resolver
: a function that accepts the following (ordered) arguments that were given to cabinet:
partial
filename
directory
config
For examples of resolver implementations, take a look at the default language resolvers:
If a given extension does not have a registered resolver, cabinet will use
a generic file resolver which is basically require('path').join
with a bit of extension defaulting logic.
npm install -g filing-cabinet
filing-cabinet [options] <dependencyPath>
filing-cabinet --help
for details on the optionsNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 2/23 approved changesets -- score normalized to 0
Reason
1 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
security policy file not detected
Details
Reason
project is not fuzzed
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