Detect different types of javascript modules formats