Gathering detailed insights and metrics for @homeofthings/node-utils
Gathering detailed insights and metrics for @homeofthings/node-utils
Gathering detailed insights and metrics for @homeofthings/node-utils
Gathering detailed insights and metrics for @homeofthings/node-utils
npm install @homeofthings/node-utils
Typescript
Module System
Node Version
NPM Version
69.7
Supply Chain
96.2
Quality
78
Maintenance
100
Vulnerability
99.6
License
TypeScript (98.11%)
JavaScript (1.77%)
Shell (0.12%)
Total Downloads
1,814
Last Day
2
Last Week
34
Last Month
109
Last Year
1,388
MIT License
6 Stars
344 Commits
1 Forks
2 Watchers
1 Branches
3 Contributors
Updated on Jul 01, 2025
Minified
Minified + Gzipped
Latest Version
1.0.4
Package Id
@homeofthings/node-utils@1.0.4
Unpacked Size
45.45 kB
Size
12.46 kB
File Count
71
NPM Version
10.5.0
Node Version
18.20.2
Published on
Apr 26, 2025
Cumulative downloads
Total Downloads
Last Day
-66.7%
2
Compared to previous day
Last Week
17.2%
34
Compared to previous week
Last Month
-24.3%
109
Compared to previous month
Last Year
225.8%
1,388
Compared to previous year
AsyncContext<T>
: little wrapper around AsyncLocalStorage
providing default value
1asyncContext = new AsyncContext(defaultContext); 2... 3asyncContext.set(newContext) 4... 5currentContext = asyncContext.get();
ConfigService
: singleton service based on node-config
1configService = new ConfigService({ configDirectory: 'path/to/config' });
then use one of the methods provided by the ConfigService
:
1export declare class ConfigService {
2 readonly configDirectory: string;
3 readonly environment: string;
4
5 constructor(_opts: ConfigOptions);
6
7 getConfig(key: string): object | undefined;
8 reloadConfig(): void;
9
10 getString(key: string, defaultValue: string): string;
11 getNumber(key: string, defaultValue: number): number;
12 getBoolean(key: string, defaultValue: boolean): boolean;
13 getObject(key: string, defaultValue: object): object;
14
15 // resolve path relative to config-directory
16 getPath(key: string, defaultValue: string): string;
17
18 getOptionalString(key: string): string | undefined;
19 getOptionalNumber(key: string): number | undefined;
20 getOptionalBoolean(key: string): boolean | undefined;
21 getOptionalObject(key: string): object | undefined;
22
23 // resolve path relative to config-directory
24 getOptionalPath(key: string): string | undefined;
25}
reload on SIGHUP:
1process.on('SIGHUP', () => ConfigService.getInstance().reloadConfig());
LruCache<T>
: LRU cache
1cache = new LruCache<UserSession, number>(SESSION_CACHE_SIZE); 2 3cache.set(id, userSession); // add this to the cache and mark it as least recently used 4... 5cache.get(anotherId); // if it is available in the cache it will be marked as least recently used
sequentialize
: run Promises
in sequence
1await sequentialize(item.map(() => doWork(item)));
wait
: wait until a condition is true or timed out
1await wait(condition); // polls until condition is true 2await wait(condition, 1000); // polls until condition is true or timed out after 1000ms
WritableStrings
: a Writable
for writing to a string array
quoteArgs
and quoteArg
: quote arguments for better readability (e.g. for logging)
No vulnerabilities found.
Reason
13 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/19 approved changesets -- 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
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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