https://github.com/dinoscapeprogramming/validurl
Check is a URL valid or not
https://github.com/dinoscapeprogramming/validurl
Last synced: about 1 year ago
JSON representation
Check is a URL valid or not
- Host: GitHub
- URL: https://github.com/dinoscapeprogramming/validurl
- Owner: DinoscapeProgramming
- License: apache-2.0
- Created: 2022-03-07T17:57:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-07T18:25:35.000Z (over 4 years ago)
- Last Synced: 2025-02-12T17:28:11.311Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Valid URL
## Get started
Just copy the __validurl.js__ file. And then you're ready to use this nicely package.
## Documentation
### Require the package
```js
const validurl = require('./validurl.js');
```
### Use the package
```js
validurl("httos://github.com")
```
## Example
```js
const validurl = require('./validurl.js');
const urls = {
"https://github.com",
"This is not a URL"
}
console.log(validurl(urls[0])) // returns true
console.log(validurl(urls[1])) // returns false
```
## HTML
### Use with script tag
```html
```
### Example
```html
alert($("github.com"))
alert($("This is not a URL"))
```
## Note
This package may take some time to load because it uses the JavaScript __new URL()__ component. Sorry, but we now this problem.
## Developer
Add __Dinoscape#4056__ on Discord to get in contact with me.