readme code to js code