Safe Url Input Checker
Safe Url Input Checker is a node.js library to check url safety.
Dependencies
API
for some methods you can use callback or not. Just few methods require a callback especially.
var urlChecker = require('safe-url-input-checker')
checkUrlSafety
var options = {};optionsblacklist = 'joker.com' 'slade.io' 'twoface.net' '...' 'magneto.vilain';optionsprotocolScheme = 'http' 'https' 'ftp';urlChecker;urlChecker;urlChecker;urlChecker;
getIPAddresses (optional callback)
urlChecker;
isAddressLocal (optional callback)
urlChecker;
isHostLocal (requested callback)
urlChecker;
isHostBlacklisted (optional callback)
var blacklist = 'joker.com' 'slade.io' 'twoface.net' '...' 'magneto.vilain';urlChecker;
isProtocolAcceptable (optional callback)
var protocolScheme = 'http' 'https' 'ftp';urlChecker;
resolveAndParseUrl (optional callback)
urlChecker;
Licence
Copyright (c) 2014 Guillaume Baudusseau
MIT