detect-link-type
Detects the type of a link, getting the extension of a provided link, in ES2015.
Installation
$> npm i -S detect-link-type
Usage
Typescript
import { Detector } from 'detect-link-type';
Javascript
const { Detector } = require('detect-link-type');
API docs
const LINK = "http://example.com/1/2/3/a.png";
Detector.getExtension(LINK);
Detector.isImage(LINK);
Detector.isPNG(LINK);
Detector.isGIF(LINK);
Detector.isJPG(LINK);
Detector.isCSS(LINK);
Detector.isHTML(LINK);
Detector.isTTF(LINK);
Detector.isJS(LINK);
Detector.isPDF(LINK);
Credits
Juan Camilo Guarin P
Otherwise SAS
http://owsas.com
LICENSE
MIT