# url-valid

> Url validity detection library

Latest version **0.3.0** (published 2014-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install url-valid
pnpm add url-valid
yarn add url-valid
bun add url-valid
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2014-07-25 |
| First published | 2013-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Daniel Yang |
| Maintainers | miniflycn |
| Keywords | valid, validity, url, library |

## Links

- npm: https://www.npmjs.com/package/url-valid
- Repository: https://github.com/miniflycn/url-valid
- Issues: https://github.com/miniflycn/url-valid/issues
- npm.io page: https://npm.io/package/url-valid

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 0.3.0 (latest) — 2014-07-25
- 0.2.0 — 2014-06-21
- 0.1.5 — 2014-01-12
- 0.1.4 — 2013-11-17
- 0.1.3 — 2013-11-13
- 0.1.2 — 2013-11-07
- 0.1.1 — 2013-10-15
- 0.1.0 — 2013-10-10

## README

[![Build Status](https://travis-ci.org/miniflycn/url-valid.png?branch=master)](https://travis-ci.org/miniflycn/url-valid)
[![Coverage Status](https://coveralls.io/repos/miniflycn/url-valid/badge.png?branch=master)](https://coveralls.io/r/miniflycn/url-valid?branch=master)
# url-valid
[![NPM](https://nodei.co/npm/url-valid.png)](https://npmjs.org/package/url-valid)

Homepage: https://github.com/miniflycn/url-valid

## Project Goals
Url validity detection library.

## Setup
Setup

    $ npm install url-valid


## Useage

```js
var valid = require('url-valid');

valid('http://www.google.com', function (err, valid) {
  if (err) throw err;
  console.log(valid);
});
```

## API
```js
/**
 * valid(url)
 * valid(url, callback)
 * @param {String} url
 * @param {Function} callback
 * @return {Valid}
 */
valid('http://ke.qq.com', function (err, valid) {
  if (err) throw err;
  console.log(valid);
});
/**
 * Valid
 * @class
 *  - on(event, callback)
 *    @param {String} event, event can be 'check', 'data', 'end'
 *    @param {Function} callback
 */
valid('http://ke.qq.com').on('check', function (err, valid) {
  if (err) throw err;
  console.log(valid);
});
/**
 *  - destroy
 */
var v = valid('http://ke.qq.com');
// do something
v.destroy();
/**
 *  - listeners
 *    @param {String} event
 *    @returns {Array} listenerList
 */
valid.on('check', function (err, valid) {
  if (err) throw err;
  console.log(valid);
}).listeners('check');
```

## Examples
* https://github.com/miniflycn/url-valid/tree/master/examples

## License
(The MIT License)

Copyright (c) 2013 Daniel Yang <miniflycn@justany.net>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
_Source: https://npm.io/package/url-valid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
