Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikeludemann/customizing-code-frame

A small library for displaying code frames
https://github.com/mikeludemann/customizing-code-frame

code customization frame

Last synced: about 2 months ago
JSON representation

A small library for displaying code frames

Awesome Lists containing this project

README

        

# customizing-code-frame

A small library for displaying code frames

Usage

```js
import { createCodeFrame } from 'customizing-code-frame';

const str = `foo\nbar\nbob`;

const codeFrame = createCodeFrame(str, 1, 2);

console.log(codeFrame);

// Logs:
// 1 | foo
// > 2 | bar
// | ^
// 3 | bob
```

### License

`MIT`, see [the license file](./LICENSE).