random-uri
Return a random url.
Install
$ npm install --save random-uri
Usage
For more use-cases see the tests
var randomUrl = ; // API// - randomUrl(options) // options// - protocol// - domain// - path// - extensions// - query// - hash ;// => 'http://www.ase.com/pateliivi/kcmd'
Optionally specify a protocol:
;// => 'ftp://www.gjiis.cn/lkiund'
Optionally specify a domain:
;// => http://www.example.com/hob/patecs/fkmsa
Optionally specify a path:
;// => 'http://www.ttksd.cn?path/to/file'
Optionally specify a extension:
;;// => 'https://ssdda.jp/asdjl/haskljh.png'
Optionally specify a query:
;// => 'https://www.asdji.com?foo=bar&baz=qux'
Optionally specify a hash:
;// => 'https://www.kjksiij.com#readme' ;// => 'https://www.jiwhahsud.com#llojsuchej'
Or combine them:
Related
- random-tld - Return a random tld(Top Level Domain).
- random-domains - Return a random domain.
- random-email - Return a random email.
- random-protocol - Return a random protocol.
- random-hashtag - Return a random hashtag.
- random-ipv4 - Return a random ipv4 address.
- random-ipv6 - Return a random ipv6 address.
- random-avatar - Return a URL to a random avatar from Gravatar.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.