"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

//#region src/eco/npm/npm/flags.ts
/**
* @file Npm CLI flag predicates. Each predicate identifies whether a single
*   argv entry matches a specific npm flag family. They're side-effect-free
*   pure functions marked `@__NO_SIDE_EFFECTS__` so bundlers can tree-shake
*   unused predicates out of consumer bundles.
*/
/**
* Check if a command argument is an npm audit flag.
*
* @example
*   ;```typescript
*   isNpmAuditFlag('--no-audit') // true
*   isNpmAuditFlag('--audit') // true
*   isNpmAuditFlag('--save') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isNpmAuditFlag(cmdArg) {
	return /^--(no-)?audit(=.*)?$/.test(cmdArg);
}
/**
* Check if a command argument is an npm fund flag.
*
* @example
*   ;```typescript
*   isNpmFundFlag('--no-fund') // true
*   isNpmFundFlag('--fund') // true
*   isNpmFundFlag('--save') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isNpmFundFlag(cmdArg) {
	return /^--(no-)?fund(=.*)?$/.test(cmdArg);
}
/**
* Check if a command argument is an npm loglevel flag.
*
* @example
*   ;```typescript
*   isNpmLoglevelFlag('--loglevel') // true
*   isNpmLoglevelFlag('--silent') // true
*   isNpmLoglevelFlag('-s') // true
*   isNpmLoglevelFlag('--save') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isNpmLoglevelFlag(cmdArg) {
	if (/^--loglevel(=.*)?$/.test(cmdArg)) return true;
	if (/^--(silent|verbose|info|warn|error|quiet)$/.test(cmdArg)) return true;
	return /^-(s|q|d|dd|ddd|v)$/.test(cmdArg);
}
/**
* Check if a command argument is an npm node-options flag.
*
* @example
*   ;```typescript
*   isNpmNodeOptionsFlag('--node-options') // true
*   isNpmNodeOptionsFlag('--node-options=--max-old-space-size=4096') // true
*   isNpmNodeOptionsFlag('--save') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isNpmNodeOptionsFlag(cmdArg) {
	return /^--node-options(=.*)?$/.test(cmdArg);
}
/**
* Check if a command argument is an npm progress flag.
*
* @example
*   ;```typescript
*   isNpmProgressFlag('--no-progress') // true
*   isNpmProgressFlag('--progress') // true
*   isNpmProgressFlag('--save') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isNpmProgressFlag(cmdArg) {
	return /^--(no-)?progress(=.*)?$/.test(cmdArg);
}

//#endregion
exports.isNpmAuditFlag = isNpmAuditFlag;
exports.isNpmFundFlag = isNpmFundFlag;
exports.isNpmLoglevelFlag = isNpmLoglevelFlag;
exports.isNpmNodeOptionsFlag = isNpmNodeOptionsFlag;
exports.isNpmProgressFlag = isNpmProgressFlag;