Git Product home page Git Product logo

fnr's Introduction

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('[email protected]');
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' }
}

fnr's People

Contributors

6km avatar fnrdev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.