Nasty Pirate Macaw

    fnr

    5.1.1 • Public • Published

    Fnr

    fnr
    • NPM package that validation phone numbers & emails & dates and many more ...

    Installation from NPM

    npm install fnr
    

    Examples Regex

    const fnr = require('fnr');
    const validation = new fnr.validation();
    
    const isEmail = validation.isEmail('me@fnrr.dev');
    const isPhoneNumber = validation.isPhoneNumber('+31636363634');
    const isDate = validation.isDate('12/5/2021');
    const isURL = validation.isURL('https://youtube.com');
    const isImage = validation.isImage('https://probot.io/static/logo1.jpg');
    const isHexColor = validation.isHexColor('#ff0000');
    const isIP = validation.isIP('63.73.251.116');
    
    console.log(isEmail); // true
    console.log(isPhoneNumber); // true
    console.log(isDate); // true
    console.log(isURL); // true
    console.log(isImage); // true
    console.log(isHexColor); // true
    console.log(isIP); // true

    Others

    const fnr = require('fnr');
    const shortClient = new fnr.shortURL('GET_YOUR_KEY_FROM_https://app.bitly.com/settings/api/');
    
    async function shortURL(url) {
        const e = await shortClient.short(url);
        console.log(e);
    }
    
    shortURL('https://probot.io');

    Output

    {
      created_at: '2021-11-14T14:35:44+0000',
      id: 'bit.ly/31Q14jw',
      link: 'https://bit.ly/31Q14jw',
      custom_bitlinks: [],
      long_url: 'https://probot.io/',
      archived: false,
      tags: [],
      deeplinks: [],
      references: { group: 'https://api-ssl.bitly.com/v4/groups/Bk98d0JwFyp' }
    }

    Install

    npm i fnr

    DownloadsWeekly Downloads

    3

    Version

    5.1.1

    License

    MIT

    Unpacked Size

    10.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • fnrdev