1.0.0 • Published 5 years ago

customizing-code-frame v1.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

customizing-code-frame

A small library for displaying code frames

Usage

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.