a simple javascript lib