Showing 1 of 6 files from the diff.
Other files ignored by Codecov
package.json has changed.
types/index.d.ts has changed.
test.js has changed.
readme.md has changed.

@@ -4,20 +4,22 @@
Loading
4 4
5 5
function factory(file) {
6 6
  var contents = indices(String(file))
7 +
  var toPoint = offsetToPointFactory(contents)
7 8
8 9
  return {
9 -
    toPosition: offsetToPositionFactory(contents),
10 -
    toOffset: positionToOffsetFactory(contents)
10 +
    toPoint: toPoint,
11 +
    toPosition: toPoint,
12 +
    toOffset: pointToOffsetFactory(contents)
11 13
  }
12 14
}
13 15
14 -
// Factory to get the line and column-based `position` for `offset` in the bound
16 +
// Factory to get the line and column-based `point` for `offset` in the bound
15 17
// indices.
16 -
function offsetToPositionFactory(indices) {
17 -
  return offsetToPosition
18 +
function offsetToPointFactory(indices) {
19 +
  return offsetToPoint
18 20
19 -
  // Get the line and column-based `position` for `offset` in the bound indices.
20 -
  function offsetToPosition(offset) {
21 +
  // Get the line and column-based `point` for `offset` in the bound indices.
22 +
  function offsetToPoint(offset) {
21 23
    var index = -1
22 24
    var length = indices.length
23 25
@@ -39,16 +41,16 @@
Loading
39 41
  }
40 42
}
41 43
42 -
// Factory to get the `offset` for a line and column-based `position` in the
44 +
// Factory to get the `offset` for a line and column-based `point` in the
43 45
// bound indices.
44 -
function positionToOffsetFactory(indices) {
45 -
  return positionToOffset
46 +
function pointToOffsetFactory(indices) {
47 +
  return pointToOffset
46 48
47 -
  // Get the `offset` for a line and column-based `position` in the bound
49 +
  // Get the `offset` for a line and column-based `point` in the bound
48 50
  // indices.
49 -
  function positionToOffset(position) {
50 -
    var line = position && position.line
51 -
    var column = position && position.column
51 +
  function pointToOffset(point) {
52 +
    var line = point && point.line
53 +
    var column = point && point.column
52 54
53 55
    if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {
54 56
      return (indices[line - 2] || 0) + column - 1 || 0
Files Coverage
index.js 100.00%
Project Totals (1 files) 100.00%
56.3
lts/dubnium=/dubnium
TRAVIS_OS_NAME=linux
56.4
node=
TRAVIS_OS_NAME=linux
56.2
node=
TRAVIS_OS_NAME=windows
56.1
lts/dubnium=/dubnium
TRAVIS_OS_NAME=windows

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading