Gathering detailed insights and metrics for requirefresh
Gathering detailed insights and metrics for requirefresh
Gathering detailed insights and metrics for requirefresh
Gathering detailed insights and metrics for requirefresh
Require a file without adding it into the require cache
npm install requirefresh
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.1
Supply Chain
100
Quality
79.4
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
38,069,423
Last Day
5,058
Last Week
72,434
Last Month
312,410
Last Year
4,133,485
1 Stars
265 Commits
1 Forks
2 Watching
1 Branches
4 Contributors
Minified
Minified + Gzipped
Latest Version
5.13.0
Package Id
requirefresh@5.13.0
Unpacked Size
40.59 kB
Size
11.04 kB
File Count
12
NPM Version
10.2.3
Node Version
20.10.0
Publised On
29 Dec 2023
Cumulative downloads
Total Downloads
Last day
10%
5,058
Compared to previous day
Last week
-2.3%
72,434
Compared to previous week
Last month
-14.6%
312,410
Compared to previous month
Last year
6.3%
4,133,485
Compared to previous year
Require a file without adding it into the require cache
Here is an example that uses Require Fresh to load the package.json
file without caching.
1// Import 2const { 3 requireFresh, 4 requireFreshCallback, 5 requireFreshPromise, 6} = require('requirefresh') 7 8// Require the module freshly synchronously (will throw errors) 9try { 10 const result = requireFresh('./package.json') 11 console.log(result) 12} catch (error) { 13 console.error(error) 14} 15 16// Require the fresh module synchronously via a callback that contains the error and result 17requireFreshCallback('./package.json', function (error, result) { 18 if (error) { 19 console.error(error) 20 } else { 21 console.log(result) 22 } 23}) 24 25// Require the fresh module synchronously via a promise 26requireFreshPromise('./package.json') 27 .then((result) => console.log(result)) 28 .catch((error) => console.error(error))
npm install --save requirefresh
import pkg from ('requirefresh')
const pkg = require('requirefresh').default
1import pkg from 'https://unpkg.com/requirefresh@^5.13.0/edition-deno/index.ts'
This package is published with the following editions:
requirefresh/source/index.ts
is TypeScript source code with Import for modulesrequirefresh
aliases requirefresh/edition-es2022/index.js
requirefresh/edition-es2022/index.js
is TypeScript compiled against ES2022 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modulesrequirefresh/edition-types/index.d.ts
is TypeScript compiled Types with Import for modulesrequirefresh/edition-deno/index.ts
is TypeScript source code made to be compatible with DenoDiscover the release history by heading on over to the HISTORY.md
file.
Discover how to contribute via the CONTRIBUTING.md
file.
Unless stated otherwise all works are:
and licensed under:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 4
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/14 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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
Score
Last Scanned on 2024-12-16
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