Smart python like argument management for javascript