Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johno/is_url
Elixir package to validate a url
https://github.com/johno/is_url
Last synced: 2 months ago
JSON representation
Elixir package to validate a url
- Host: GitHub
- URL: https://github.com/johno/is_url
- Owner: johno
- License: mit
- Created: 2015-11-07T18:00:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-07T18:10:40.000Z (about 9 years ago)
- Last Synced: 2024-04-14T07:47:53.487Z (10 months ago)
- Language: Elixir
- Homepage: http://hexdocs.pm/is_url/
- Size: 0 Bytes
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is_url [![Build Status](https://travis-ci.org/johnotander/is_url.svg?branch=master)](https://travis-ci.org/johnotander/is_url)
Validate a url.
## Installation
Add is_url to your list of dependencies in `mix.exs`
```elixir
def deps do
[{:is_url, "~> 0.0.1"}]
end
```Ensure is_url is started before your application
```elixir
def application do
[applications: [:is_url]]
end
```## Usage
```elixir
IsUrl.validate("http://johnotander.com") # => true
IsUrl.validate("ftp://www.foo.bar") # => true
IsUrl.validate("foo.bar") # => false
```## Development
```
mix test
```## License
MIT
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull RequestCrafted with <3 by [John Otander](http://johnotander.com) ([@4lpine](https://twitter.com/4lpine)).