Class: XTable

XTable(matrix)

Represents an excel table, where first row is the title, second row the name of each column, and next rows the data.

Constructor

new XTable(matrix)

Constructor of the class.
Parameters:
Name Type Description
matrix Array.<Array.<Object>> Matrix with the data from the excel table.
Source:

Methods

build(block)

Build the instance from a block of the excel representing the table.
Parameters:
Name Type Description
block Array.<Array.<Object>> Block of data directly from the excel.
Source:

find(query) → {Array.<Object>}

Given a query, find the rows that match the given query
Parameters:
Name Type Description
query Objet Query for the match.
Source:
Returns:
Rows that match the query, cloned.
Type
Array.<Object>

findOne(query) → {Object}

Givena query, find the first row that match the query.
Parameters:
Name Type Description
query Object Query for the match.
Source:
Returns:
First row that match the query, cloned.
Type
Object

match(row, query) → {boolean}

Indicates if a row match a given query.
Parameters:
Name Type Description
row Object Row to match
query Object Query for the match
Source:
Returns:
True if the row matchs the query, false otherwise.
Type
boolean