UNPKG

util-helpers

Version:

一个基于业务场景的工具方法库

8 lines (5 loc) 193 B
import { isString, nth } from 'ut2'; function getExtname(path) { return isString(path) && path.indexOf('.') > 0 ? '.' + nth(path.split('.'), -1) : ''; } export { getExtname as default };