# pinpoint

> Display an arrow in a string of code to point to a location

Latest version **1.1.0** (published 2013-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install pinpoint
pnpm add pinpoint
yarn add pinpoint
bun add pinpoint
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2013-09-21 |
| First published | 2013-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Glen Huang |
| Maintainers | curvedmark |
| Keywords | editor |

## Links

- npm: https://www.npmjs.com/package/pinpoint
- Repository: https://github.com/curvedmark/pinpoint
- Issues: https://github.com/curvedmark/pinpoint/issues
- npm.io page: https://npm.io/package/pinpoint

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2013-09-21
- 1.0.0 — 2013-08-19

## README

# pinpoint

Add line numbers and an arrow to a string of code that points to a specific location.

## Installation

	npm install pinpoint

## Example

With this code:

```javascript
function add(left, right) {
  return left + right;
}

console.log(add(1 + 1));
```

When being asked to point to line 2 and column 2, generates this:

```javascript
1| function add(left, right) {
2|   return left + right;
-----^
3| }
4|
5| console.log(add(1 + 1));
```
## API

```javascript
var pinpoint = require('pinpoint');

var str = pinpoint(code, options);
```

* `code` - a string of code
* `options` - an object literal supports these options:
	* `line` - the line number to point to, 1-based.
	* `column` - the column number to point to, 1-based.
	* `showLines` - the number of lines to show. The pointed line will try to stay in the middle of the displays lines.
	* `indent` - indent string prepend to each line, before the line number.
	* `tabSize` - width of a tab character.

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