Skip to content

sterpe/line-source

Repository files navigation

line-source

js-standard-style

What is it?

It returns a source for a line of text.

const LineSource = require('line-source')

const l = new LineSource('foo bar quux')

l.currentChar // => 'f'
l.position // => 1
l.peekChar() // => 'o'
l.nextChar() // => 'o'

// All methods and properties return `null' once the 
// currentChar has moved past the end of the source
// string.
//
// An error is thrown if the input string contains
// unescaped newline characters (`\n`).

How do I work on it?

development

git clone https://github.com/sterpe/line-source.git
cd line-source
make

build

make build

test

make JEST_FLAGS=--coverage test

lint

make lint

Consult the Makefile for further details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published