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
Prepare a node environment to require files with different extensions.
npm install rechoir
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
48 Stars
62 Commits
13 Forks
9 Watchers
1 Branches
11 Contributors
Updated on Mar 26, 2024
Latest Version
0.8.0
Package Id
rechoir@0.8.0
Size
3.73 kB
NPM Version
6.14.10
Node Version
14.15.4
Published on
Jul 24, 2021
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
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 binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
Found 2/29 approved changesets -- score normalized to 0
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 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