# log-syntax-error

> Highlight syntax error locations

Latest version **0.1.1** (published 2015-04-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install log-syntax-error
pnpm add log-syntax-error
yarn add log-syntax-error
bun add log-syntax-error
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-04-04 |
| First published | 2015-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rich Harris |
| Maintainers | rich_harris |

## Links

- npm: https://www.npmjs.com/package/log-syntax-error
- npm.io page: https://npm.io/package/log-syntax-error

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^1.0.0

## Recent versions

- 0.1.1 (latest) — 2015-04-04
- 0.1.0 — 2015-04-04

## README

# log-syntax-error

Generates a block of text highlighting a syntax error, suitable for printing to a console.

## Installation

```bash
npm install log-syntax-error
```

## Usage

```js
var block = logSyntaxError( code, line, column, options );
console.error( block );
```

* `code` is some source code
* `line` is the (one-based) line number of the error
* `column` (optional) is the (zero-based) column number of the error
* `options` (optional)
    * `buffer` - the number of lines to include either side of the error. Defaults to `2`.

## License

MIT.

---
_Source: https://npm.io/package/log-syntax-error · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
