
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
memo-again
Advanced tools
Two-level memoizer
with promises stores function values in memory and/or file caches.
Writes to memory and file caches can be independently
changed on demand.
The file cache is stored in the application local
folder
by default, so you may want to add local/
to .gitignore
.
For more examples, see test/memoizer.js
const { Memoizer } = require("memo-again");
var f = x=>42+x;
var mzr = new Memoizer();
var fmemo = mzr.memoize(f);
fmemo(0); // 42
fmemo(0); // 42 (cached)
fmemo(1); // 43
fmemo(1); // 43 (cached)
File iterators and more...
Async generator permits precise control of thread usage.
var files = [];
for await (let f of Files.files(FILES_DIR)) {
files.unshift(f);
}
// [ "hello", "sub/basement", "universe", ]
Async generator provides fs.Stats
var opts = {
root: FILES_DIR,
stats: true, // return fs.Stats object
absolute: true, // return absolute filepath
}
for await (let f of Files.files(FILES_DIR)) {
console.log(JSON.stringify(f));
// {path:..., stats:...}
}
Sync generator uses fs sync methods and can be slower.
var files = [...Files.filesSync(FILES_DIR)];
// [ "hello", "sub/basement", "universe", ]
The application that uses this library
console.log(Files.APP_DIR);
// /home/somebody/myapp
Use "local" folder for application data.
Remember to add it to .gitignore
console.log(Files.LOCAL_DIR);
// /home/somebody/myapp/local
FAQs
Serializable memoizer with promises
We found that memo-again 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.