base tools for js