返回path路径文件扩展名,如果path以 ‘.' 为结尾,将返回 ‘.',如果无扩展名 又 不以'.'结尾,将返回空值。

path.extname('index.html'); // returns '.html'
path.extname('index.'); // returns '.'
path.extname('index'); // returns ''

 

相关文章:

  • 2022-01-24
  • 2021-10-31
  • 2021-04-06
  • 2021-11-18
  • 2021-08-03
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2021-08-12
  • 2021-09-06
  • 2021-06-01
  • 2021-09-28
相关资源
相似解决方案