diff options
author | Minteck <contact@minteck.org> | 2021-12-21 16:52:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-21 16:52:28 +0100 |
commit | 46e43f4bde4a35785b4997b81e86cd19f046b69b (patch) | |
tree | c53c2f826f777f9d6b2d249dab556feb72a6c3a6 /src/node_modules/chance/docs/web/url.md | |
download | langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2 langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip |
Commit
Diffstat (limited to 'src/node_modules/chance/docs/web/url.md')
-rw-r--r-- | src/node_modules/chance/docs/web/url.md | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/node_modules/chance/docs/web/url.md b/src/node_modules/chance/docs/web/url.md new file mode 100644 index 0000000..cb93848 --- /dev/null +++ b/src/node_modules/chance/docs/web/url.md @@ -0,0 +1,53 @@ +# url + +```js +// usage +chance.url() +chance.url({protocol: 'ftp'}) +chance.url({domain: 'www.socialradar.com'}) +chance.url({domain_prefix: 'docs'}) +chance.url({path: 'images'}) +chance.url({extensions: ['gif', 'jpg', 'png']}) +``` + +Return a random url. + +```js +chance.url() +=> 'http://vanogsi.io/pateliivi' +``` + +Optionally specify a protocol and the url will be random but the protocol will not. + +```js +chance.url({protocol: 'ftp'}) +=> 'ftp://mibfu.nr/kardate' +``` + +Optionally specify a domain and the url will be random but the domain will not. + +```js +chance.url({domain: 'www.socialradar.com'}) +=> 'http://www.socialradar.com/hob' +``` + +Optionally specify a domain prefix and domain will be random, and domain prefix will not. + +```js +chance.url({domain_prefix: 'docs'}) +=> 'http://docs.tuos.ni/itecabup' +``` + +Optionally specify a path and it will be obeyed. + +```js +chance.url({path: 'images'}) +=> 'http://tainvoz.net/images' +``` + +Optionally specify an array of extensions and one will be picked at random. + +```js +chance.url({extensions: ['gif', 'jpg', 'png']}) +=> 'http://vagjiup.gov/udmopke.png' +``` |