Sequence Comparison Table
Tools to help making sense of sequences. I use this for visualizing the sequence of events across browsers, amongst other things.
see demo
Installation
This package currently only works with AMD (e.g. RequireJS).
# via bowerbower install sequence-comparison-table# via npmnpm install sequence-comparison-table
Usage
// input sequence datavar sourceData = first: 'alpha' 'charlie' 'delta' second: 'bravo' 'charlie' 'delta' 'echo' third: 'alpha' 'alpha' 'charlie' 'alpha' 'delta'; // work through the sequencesvar mapSequences = ;var mapped = ; // resulting data structuremapped === // merged sequence (maintaining order, allowing duplicates) sequence: 'alpha' 'bravo' 'alpha' 'charlie' 'alpha' 'delta' 'echo' // mapping input data indexes: // indexInSourceData === table.indexes[indexInTableRows] indexes: first: 0 null null 1 null 2 null second: null null 0 1 null 2 3 third: 0 1 null 2 3 4 null ; // translate sequences to a <tbody>var sequenceTableBody = ;var tbody = ; // translate sequences to a <table>var sequenceTable = ;var table = ;
Changelog
0.2.1 (December 4th 2014)
- fixing
package.json
to properly includemerge-arrays.js
0.2.0 (December 4th 2014)
- adding
columnNames
callback signature tosequenceTable()
- adding
columGroups
mapping tosequenceTable()
- adding
data-group="…"
mapping on data cells tosequenceTable()
- adding
titleCell
mapping tosequenceTableBody()
- fixing
sequenceTable()
to treatoptions
as an optional thing
0.1.0 (November 26th 2014)
- initial release
License
sequence-comparison-table.js is published under the MIT License.