1.0.4 • Published 4 years ago

@sourcegraph/event-positions v1.0.4

Weekly downloads
6,783
License
MIT
Repository
github
Last release
4 years ago

Event Positions

build codecov code style: prettier semantic-release

This is a small library used to determining the the positions that events happened at in code views.

Installation

npm install @sourcegraph/event-positions

Usage

It is currently exposed as an RxJs Operator

import { findPositionsFromEvents } from 'event-positions'

observableOfDomElements
  .pipe(
    findPositionsFromEvents({
      ...props,
    })
  )
  .subscribe(positionEvent => console.log(positionEvent)) // { line: ..., character: ..., token: ... }