amd commonjs support. js code