js version of parse-dosies