removing bareword in api.js