Building a lightweight JS/TS statistical library: challenges and design choices