Gathering detailed insights and metrics for rechoir
Gathering detailed insights and metrics for rechoir
Gathering detailed insights and metrics for rechoir
Gathering detailed insights and metrics for rechoir
@types/rechoir
TypeScript definitions for rechoir
interpret
A dictionary of file extensions and associated module loaders.
@wrench/loaders
Prepare a node environment to require files with different extensions.
multilang-module-loader
A utility library that helps loading modules dynamically in multiple languages, including JSON, YAML, JavaScript and TypeScript.
Prepare a node environment to require files with different extensions.
npm install rechoir
90.6
Supply Chain
89.1
Quality
75.7
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
48 Stars
62 Commits
12 Forks
10 Watching
1 Branches
11 Contributors
Updated on 26 Mar 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-8%
3,459,492
Compared to previous day
Last week
2.2%
20,474,493
Compared to previous week
Last month
17.3%
82,257,746
Compared to previous month
Last year
6.6%
836,462,003
Compared to previous year
Prepare a node environment to require files with different extensions.
This module, in conjunction with interpret-like objects, can register any filetype the npm ecosystem has a module loader for. This library is a dependency of liftoff.
Note: While rechoir
will automatically load and register transpilers like coffee-script
, you must provide a local installation. The transpilers are not bundled with this module.
1const config = require('interpret').extensions; 2const rechoir = require('rechoir'); 3rechoir.prepare(config, './test/fixtures/test.coffee'); 4rechoir.prepare(config, './test/fixtures/test.csv'); 5rechoir.prepare(config, './test/fixtures/test.toml'); 6 7console.log(require('./test/fixtures/test.coffee')); 8console.log(require('./test/fixtures/test.csv')); 9console.log(require('./test/fixtures/test.toml'));
prepare(config, filepath, [cwd], [noThrow])
Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into require.extensions.
config
An interpret-like configuration object.
filepath
A file whose type you'd like to register a module loader for.
cwd
An optional path to start searching for the module required to load the requested file. Defaults to the directory of filepath
.
noThrow
An optional boolean indicating if the method should avoid throwing.
If calling this method is successful (e.g. it doesn't throw), you can now require files of the type you requested natively.
An error with a failures
property will be thrown if the module loader(s) configured for a given extension cannot be registered.
If a loader is already registered, this will simply return true
.
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/29 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
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