detect-link-type
npm i detect-link-type

detect-link-type

Collection of Open Source packages by Otherwise

by owsas

1.1.2 (see all)License:MITTypeScript:Not Found
npm i detect-link-type
Readme

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); // "png"
Detector.isImage(LINK); // true
Detector.isPNG(LINK); // true
Detector.isGIF(LINK); // false
Detector.isJPG(LINK); // false
Detector.isCSS(LINK); // false
Detector.isHTML(LINK); // false
Detector.isTTF(LINK); // false
Detector.isJS(LINK); // false
Detector.isPDF(LINK); // false

Credits

Juan Camilo Guarin P
Otherwise SAS
http://owsas.com

LICENSE

MIT

Downloads/wk

7

GitHub Stars

20

LAST COMMIT

4mos ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

7

OPEN PRs

26
VersionTagPublished
1.1.2
latest
4mos ago
No alternatives found
No tutorials found
Add a tutorial