a basic js lib