refactor(util) getExtension