Installations
npm install url-valid
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>= 0.8.0
NPM Version
1.4.9
Score
71.1
Supply Chain
91.8
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
47,245
Last Day
10
Last Week
37
Last Month
103
Last Year
2,516
GitHub Statistics
8 Stars
53 Commits
2 Forks
4 Watching
1 Branches
1 Contributors
Bundle Size
2.32 kB
Minified
1.05 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.3.0
Package Id
url-valid@0.3.0
Size
5.76 kB
NPM Version
1.4.9
Total Downloads
Cumulative downloads
Total Downloads
47,245
Last day
100%
10
Compared to previous day
Last week
60.9%
37
Compared to previous week
Last month
43.1%
103
Compared to previous month
Last year
-18.7%
2,516
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
url-valid
Homepage: https://github.com/miniflycn/url-valid
Project Goals
Url validity detection library.
Setup
Setup
$ npm install url-valid
Useage
1var valid = require('url-valid'); 2 3valid('http://www.google.com', function (err, valid) { 4 if (err) throw err; 5 console.log(valid); 6});
API
1/** 2 * valid(url) 3 * valid(url, callback) 4 * @param {String} url 5 * @param {Function} callback 6 * @return {Valid} 7 */ 8valid('http://ke.qq.com', function (err, valid) { 9 if (err) throw err; 10 console.log(valid); 11}); 12/** 13 * Valid 14 * @class 15 * - on(event, callback) 16 * @param {String} event, event can be 'check', 'data', 'end' 17 * @param {Function} callback 18 */ 19valid('http://ke.qq.com').on('check', function (err, valid) { 20 if (err) throw err; 21 console.log(valid); 22}); 23/** 24 * - destroy 25 */ 26var v = valid('http://ke.qq.com'); 27// do something 28v.destroy(); 29/** 30 * - listeners 31 * @param {String} event 32 * @returns {Array} listenerList 33 */ 34valid.on('check', function (err, valid) { 35 if (err) throw err; 36 console.log(valid); 37}).listeners('check');
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.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.6
/10
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More