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/avatar.md | |
download | langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2 langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip |
Commit
Diffstat (limited to 'src/node_modules/chance/docs/web/avatar.md')
-rw-r--r-- | src/node_modules/chance/docs/web/avatar.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/node_modules/chance/docs/web/avatar.md b/src/node_modules/chance/docs/web/avatar.md new file mode 100644 index 0000000..8feaff0 --- /dev/null +++ b/src/node_modules/chance/docs/web/avatar.md @@ -0,0 +1,42 @@ +# avatar + +```js +// usage +chance.avatar() +chance.avatar({protocol: 'https'}) +chance.avatar({fileExtension: 'jpg'}) +chance.avatar({email: 'mail@victorquinn.com'}) +``` + +Return a URL to a random avatar from Gravatar. + +```js +chance.avatar() +=> '//www.gravatar.com/avatar/41f84bab4a852971eb1d26a287acb763' +``` + +By default, a url is returned without a protocol. Specify one to get a random +url but with a known protocol + +```js +chance.avatar({protocol: 'https'}) +=> 'https://www.gravatar.com/avatar/f40260c4058cc904b7db652c26099966' +``` + +Optionally specify a file extension to get one of a known type + +```js +chance.avatar({fileExtension: 'jpg'}) +=> '//www.gravatar.com/avatar/76697df5874c854e3cc8fde1200b4298.jpg' +``` + +You can also use it with a known email address to just get that gravatar. + +However, note this, of course, no longer makes it random, just more of a helper +function: + +```js +chance.avatar({email: 'mail@victorquinn.com'}) +=> 'www.gravatar.com/avatar/8595c2591b0bca22e736813af33fa7c3' +``` + |