Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is Localhost

Installation

npm i @andreoneti/islocalhost or yarn add @andreoneti/islocalhost

Use

const { isLocalhost } = require('@andreoneti/islocalhost');

isLocalhost("localhost");             // true
isLocalhost("127.0.0.1");             // true
isLocalhost("google.com");            // false

OR

import { isLocalhost } from '@andreoneti/islocalhost';

isLocalhost("localhost");             // true
isLocalhost("127.0.0.1");             // true
isLocalhost("google.com");            // false

About

Verification if url is localhost or not.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages