Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
File decorator for docopt option parser.
It's not easy to work with docopt in pure JavaScript since, unlike Python and CoffeeScript, there's no simple way to define a multiline string to contain the usage string.
This package provides a decorator for docopt to solve this problem.
/*
Usage: hello [options] <world>
Arguments:
<world> Hello world!
Options:
-h, --help Show this help.
--version Show version.
--happy Be happy.
*/
var docopt = require('fdocopt')();
By default it will decorate the global docopt instance, so the above is the same as:
var docopt = require('fdocopt')(require('docopt').docopt);
Then, pass the documented filename instead of the usage string:
var args = docopt(__filename);
You can also use the internal functions to extract the comment block from a file or a code buffer:
var doc = require('fdocopt').extract(__filename);
var doc = require('fdocopt').extractBuffer('/** Usage: hello */');
FAQs
> File decorator for [docopt] option parser.
The npm package fdocopt receives a total of 27 weekly downloads. As such, fdocopt popularity was classified as not popular.
We found that fdocopt 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.