JSPM

get-ext

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2915
  • Score
    100M100P100Q114228F
  • License MIT

Tiny path.extname method

Package Exports

  • get-ext

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

get-ext stable

Get extension from a path/filename string. Because path is too massive, and other extname-like libs are too big or wrong.

npm install get-ext

const extname = require('get-ext');

let ext = extname('./my/path/to.my/file.svg');

//ext === '.svg'