Library modeled in Javascript