hess-get-bills-table-indices

1.0.0 • Public • Published

Hess Get Bill Table Indices

Get the current bill indices from the text like 1-7 of 514 Natural Gas Invoices in the header of the bills table on the Hess Energy website https://hessenergy.com

Installation

npm install -S hess-get-bill-table-indices

Usage

var getIndices = require('hess-get-bills-table-indices')
var html = 'foo html here' // html of the webpage containing the a single page in table of bills for a given account
var $ = cheerio.load(html)
getIndices($, function (err, indices) {
  if (err) {
    console.log(err.stack)
    delete err.stack
    inspect(err, 'error getting bills table indices')
    return
  }
  inspect(indices, 'bills table indices')
})

indices in the example above looks like

var indices = {
  start: 1,
  end: 7
  total: 514
}

Test

# install development dependencies 
npm install
# run tests 
npm test

Readme

Keywords

none

Package Sidebar

Install

npm i hess-get-bills-table-indices

Weekly Downloads

1

Version

1.0.0

License

BSD

Last publish

Collaborators

  • clewfirst