UNPKG

util-helpers

Version:

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

10 lines (6 loc) 200 B
'use strict'; var ut2 = require('ut2'); function getExtname(path) { return ut2.isString(path) && path.indexOf('.') > 0 ? '.' + ut2.nth(path.split('.'), -1) : ''; } module.exports = getExtname;