Nosferatu's Pace Maker

    detect-link-type
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.2 • Public • Published

    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

    Install

    npm i detect-link-type

    DownloadsWeekly Downloads

    3

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    5.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • jcguarinpenaranda123