{"dist":{"shasum":"94cb07c02d61ad150ccef043ec2cd7e2fe26325d","tarball":"https://registry.npmjs.org/valid-url/-/valid-url-1.0.5.tgz","integrity":"sha512-tcrcugsweAwk7vS+85dCJ/qe0pXfckf6MTqzupkOh+o4zLU/jkTtToFhAgKdrHrtA0mYKBYy0K60Xa1Q5oyjQQ==","signatures":[{"sig":"MEYCIQCFDpGO2dqcGluEQcET1l0UFleTMiP7bwVpeZ0QyoVfFgIhALqIU+/HfneZRFx9TBV+KElFArMLYdwq+wfr0C83MljU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","name":"valid-url","_from":".","readme":"URI validation functions\n==\n[![Build Status](https://travis-ci.org/ogt/valid-url.png)](https://travis-ci.org/ogt/valid-url)\n\n## Synopsis\n\nCommon url validation methods \n```\n    var validUrl = require('valid-url');\n  \n    if (validUrl.isUri(suspect)){\n        console.log('Looks like an URI');\n    } else {\n        console.log('Not a URI');\n    }\n```\n\nReplicates the functionality of Richard Sonnen <sonnen@richardsonnen.com> perl module :\nhttp://search.cpan.org/~sonnen/Data-Validate-URI-0.01/lib/Data/Validate/URI.pm [full code here](http://anonscm.debian.org/gitweb/?p=users/dom/libdata-validate-uri-perl.git)\ninto a nodejs module. Initially translated practically line by line from perl. Subsequently rewritten to leverage [url](http://nodejs.org/api/url.html).\nIt passes all the original tests.\n\n## Description\n\n(copied from original perl module)\n\n> This module collects common URI validation routines to make input validation, and untainting easier and more readable.\n> All functions return an untainted value if the test passes, and undef if it fails. This means that you should always check for a defined status explicitly. Don't assume the return will be true.\n> The value to test is always the first (and often only) argument.\n> There are a number of other URI validation modules out there as well (see below.) This one focuses on being fast, lightweight, and relatively 'real-world'. i.e. it's good if you want to check user input, and don't need to parse out the URI/URL into chunks.\n> Right now the module focuses on HTTP URIs, since they're arguably the most common. If you have a specialized scheme you'd like to have supported, let me know.\n\n## Installation \n\n```\nnpm install valid-url\n```\n\n## Methods\n\n `\n isUri(value)\n `  \n **accepts** value as string to be checked as any protocol url  \n **returns** undefined if is not url, returns RFC 3986 url if valid\n\n `\n isHttpUri(value, allowHttps)\n `  \n **accepts** *value* as string to be checked as HTTP url, *allowHttps* as boolean to include https urls *(optional)*  \n **returns** undefined if is not url, returns RFC 3986 url if valid  \n\n `\n isHttpsUri(value)\n `  \n **accepts** value as string to be checked as HTTPS url  \n **returns** undefined if is not url, returns RFC 3986 url if valid  \n \n `\n isWebUri(value)\n `  \n **accepts** value as string to be checked as HTTP or HTTPS url  \n **returns** undefined if is not url, returns RFC 3986 url if valid  \n","scripts":{"test":"make test"},"_npmUser":{"name":"odysseas","email":"odysseas@tsatalos.com"},"keywords":["url","validation","check","checker","pattern"],"repository":{"url":"git://github.com/ogt/valid-url.git"},"_npmVersion":"1.2.18","description":"URI validation functions","directories":{},"maintainers":[{"name":"odysseas","email":"odysseas@tsatalos.com"},{"name":"sagens","email":"zholudev.s@gmail.com"}],"dependencies":{},"readmeFilename":"README.md","devDependencies":{"tap":"~0.4.3","vows":"*","assert":"*","jshint":"~2.1.4"},"_id":"valid-url@1.0.5","version":"1.0.5"}