first pass at js library