Convert normal js to CMD module