is-this-local

Predicate for whether the current document location is localhost


Keywords
localhost, browser
License
MIT
Install
npm install is-this-local@1.0.0

Documentation

is-this-local

Build Status NPM version

Predicate for whether the current document location is localhost

Install

$ npm install --save is-this-local

Browser only. Chiefly meant to be used with Browserify.

Usage

// if current page host is a loopback address

var isLocal = require('is-this-local');
//=> true


// is current page host is not a loopback address

var isLocal = require('is-this-local');
//=> false

License

MIT © Victor Nascimento Bakke