
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
lazy-cache-cli
Advanced tools
Super basic CLI for adding a `utils.js` file for adding lazy-cache to a project.
Super basic CLI for adding a
utils.jsfile for adding lazy-cache to a project.
Install globally with npm
$ npm i -g lazy-cache-cli
$ lazy
Running the lazy command will do two things:
utils.js with var utils = require('lazy-cache')(require); and a list of dependencies from package.jsonutils.js filepath to the files property in package.jsonOptions
-f | --file: Optionally specify a filename to use for the created file. The default is utils.js$ lazy -f foo.js
For those who can't sleep and/or would rather read this than do virtually anything else that would be fun and not this.
What's lazy-caching?
lazy-caching offers the huge advantage of only loading modules that are actually called at some point in the lifecycle of the application.
Why does this project exist?
I made this for two reasons:
utils.js to package.json, so this is my crutch.What is this project?
This is a CLI for adding lazy-cache to your project. You don't need a CLI for that really, since you can just require it in and start using it. But I like to add lazily-required module dependencies to utils.js file.
Why do you add lazy-cached deps to utils.js?
The short version: I view this tiny bit of ugliness as a tradeoff.
You're saying that you'll make my application faster whilst also allowing browserify and webpack to find dependencies, and all I need to do is add utils.js with some ugly code and temporary re-assignment of
require? Sold. Where do I sign?
TLDR: I like to use temporary re-assignment of the require function to trick browserfy and webpack into finding lazily-required module dependencies that - despite being needed by the project - might never actually be called (depending on how the application is used or the options passed by the user, etc). Thus, browserify would not otherwise discover these lazy dependencies while instrumenting the code.
Similar projects or projects you might find interesting based on this one.
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on October 20, 2015.
FAQs
CLI for adding a `utils.js` file with lazy-cached requires.
The npm package lazy-cache-cli receives a total of 2 weekly downloads. As such, lazy-cache-cli popularity was classified as not popular.
We found that lazy-cache-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.