
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@homeofthings/node-utils
Advanced tools
AsyncContext<T>
: little wrapper around AsyncLocalStorage
providing default value
asyncContext = new AsyncContext(defaultContext);
...
asyncContext.set(newContext)
...
currentContext = asyncContext.get();
sequentialize
: run Promises
in sequence
await sequentialize(item.map(() => doWork(item)));
wait
: wait until a condition is true or timed out
await wait(condition); // polls until condition is true
await wait(condition, 1000); // polls until condition is true or timed out after 1000ms
LruCache<T>
: LRU cache
cache = new LruCache<UserSession, number>(SESSION_CACHE_SIZE);
cache.set(id, userSession); // add this to the cache and mark it as least recently used
...
cache.get(anotherId); // if it is available in the cache it will be marked as least recently used
WritableStrings
: a Writable
for writing to a string array
quoteArgs
and quoteArg
: quote arguments for better readability (e.g. for logging)
FAQs
HomeOfThings - Node Utils: various utilities and common types
The npm package @homeofthings/node-utils receives a total of 13 weekly downloads. As such, @homeofthings/node-utils popularity was classified as not popular.
We found that @homeofthings/node-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.