GMOD / ucsc-hub-js

read and write UCSC track and assembly hub files in node or the browser
MIT License
5 stars 2 forks source link

Refactors to use objects instead of extending Map type #37

Closed cmdcolin closed 10 months ago

cmdcolin commented 11 months ago

This is an approach for addressing refactors proposed in https://github.com/GMOD/ucsc-hub-js/issues/36

It is a breaking change, but the semver of 0.x allows such things

List of changes

1) A single tracks object representing a TrackDbFile on the SingleFileHub 2) A single genome representing an RaStanza on the SingleFileHub 3) A single hub description representing an RaStanza on the SingleFileHub 4) Removal of update/delete/add notions: just static constructor 5) Removal of stringifying and toString to re-constitute a trackhub 6) Instead of extending Map, everything is a plain class with a "data" field that is a plain object

cmdcolin commented 11 months ago

cc @garrettjstevens I would be interested in what your thoughts are on this approach. likely I could go back to the map and just do the singlefilehub changes, but I found using objects to be easier reason about

cmdcolin commented 10 months ago

chatted about this in pairing :)