Object-oriented JavaScript model of a public library