open-index/open-npm huggingface dataset:
npm package: @orda-2/console-log-tagger
Description: Auto-prefix console.log with filename and line number
Latest version: 1.0.2

# @orda-2/console-log-tagger

Auto-prefix every `console.log` with the file path and line number where it lives — making debugging a lot easier.

```js
// Before
console.log(result);

// After
console.log(`[src/utils.js:42] `, result);
```

---

## Installation / Instalación

```bash
npm install -g @orda-2/console-log-tagger
```

Or as a dev dependency / O como dependencia de desarrollo:

```bash
npm install --save-dev @orda-2/console-log-tagger
```

---

## Usage / Uso

```bash
console-log-tagger [directory] [options]
```

If no directory is provided, it defaults to the current folder.  
Si no se indica directorio, usa la carpeta actual.

---

## Commands / Comandos

| Command | What it does | Qué hace |
|---|---|---|
| `console-log-tagger ./src` | Tag all `console.log` with file + line | Agrega prefijo de archivo y línea a cada `console.log` |
| `console-log-tagger ./src --list` | List all `console.log` found | Lista todos los `console.log` encontrados |
| `console-log-tagger ./src --restore` | Remove tags, restore original logs | Elimina los prefijos y restaura los logs originales |
| `console-log-tagger ./src --delete` | Delete all lines with `console.log` | Elimina todas las líneas que contengan `console.log` |
| `console-log-tagger ./src --dry-run` | Preview changes without writing files | Muestra qué cambiaría sin modificar archivos |

---

## Supported File Types / Tipos de archivo soportados

`js` `ts` `jsx` `tsx` `mjs` `cjs` `vue` `svelte` `astro` `html` `htm` `coffee` `es` `es6` `ejs` `hbs` `pug` `jade`

Automatically ignores / Ignora automáticamente: `node_modules`, `dist`, `build`, `*.min.js`

---

## Examples / Ejemplos

```bash
# Tag all logs in src/
console-log-tagger ./src

# Preview without modifying files
console-log-tagger ./src --dry-run

# List all console.logs
console-log-tagger ./src --list

# Remove all tags (undo)
console-log-tagger ./src --restore

# Delete all console.log lines
console-log-tagger ./src --delete
```

---

## License

MIT