TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Unix compliant arg parser for Node.js (https://github.com/bucaran/parsec)

2 点作者 bucaran将近 10 年前
Long time `minimist` user here. Leanest and simplest of the pack at just 200 LOC with _no_ dependencies by the legendary substack.<p>Unfortunately the documentation is scarce, it has a growing number of unresolved issues and it simply does <i>not</i> adhere to the [UNIX utility conventions](http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;7908799&#x2F;xbd&#x2F;utilconv.html) very well (see [here](https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;minimist&#x2F;issues&#x2F;50)).<p>Parsec is only <i></i>50<i></i> LOC and the API is simpler, and still no dependencies!<p>## Features<p>+ Well documented + Based in → [UNIX Utility Conventions](http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;7908799&#x2F;xbd&#x2F;utilconv.html) + Custom aliases + Default shorthands + Default values &#x2F; types + Handle --no-* options + Handle unknown options

1 comment

bucaran将近 10 年前
Link: <a href="https:&#x2F;&#x2F;github.com&#x2F;bucaran&#x2F;parsec" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bucaran&#x2F;parsec</a><p>Long time `minimist` user here. Leanest and simplest of the pack at just 200 LOC with _no_ dependencies by the legendary substack.<p>Unfortunately the documentation is scarce, it has a growing number of unresolved issues → <a href="https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;minimist&#x2F;issues&#x2F;50" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;minimist&#x2F;issues&#x2F;50</a>.<p>Parsec is only 50 LOC and the API is simpler, and still no dependencies!<p>Features<p>+ Well documented + Based in → [UNIX Utility Conventions](<a href="http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;7908799&#x2F;xbd&#x2F;utilconv.html" rel="nofollow">http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;7908799&#x2F;xbd&#x2F;utilconv.ht...</a>)<p>+ Custom aliases + Default shorthands<p>+ Default values &#x2F; types + Handle --no-* options<p>+ Handle unknown options