Back to Explore

sindresorhus/has-flag

GitHub
3 watchersOpen source

Last release:

A small Node.js utility that checks whether a given CLI argument list (defaults to process.argv) contains a specific flag, returning true or false. It supports checking short and long flags and stops searching after an -- argument terminator.

Project status

  • The source appears quiet and not actively maintained, with the last upstream push in 2021, and no evidence of ongoing updates since v5.0.1 on 2021-07-19.
  • Update cadence is effectively dormant relative to today (2026-09-10), with the most recent updates from mid 2021, and a previous major in 2021 and earlier changes in 2019.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v5.0.1

    Release v5.0.1 makes a small change related to how `process` is accessed. It updates the package version and modifies the implementation to explicitly import the `process` module for use as the default source of `process.argv`.

  • v5.0.0

    v5.0.0 is a major release of has-flag that raises the minimum Node.js version to Node 12 and switches the package to pure ESM. The code changes are small, but they include packaging and TypeScript surface-area adjustments that can affect consumers relying on CommonJS or deep imports.

    Breaking
  • v4.0.0

    v4.0.0 introduces TypeScript type definitions and updates the supported runtime requirements. The primary upgrade concern is that the package now requires Node.js 8, which may break older Node versions.

    BreakingFeatures