base lib for js