* Add `count` optional argument to Collection methods
[NON-BREAKING CHANGE]
An optional `count` argument is added to the following methods:
- random() and randomKey()
- first() and firstKey()
- last() and lastKey()
If `count` is used, the method returns an array instead of only the value. Performance impact non-existent for existing code. Performance for returning an array has been measured and this is the fastest I could find (array[i] = value is faster than array.push()).
* Update Collection.js
Fixed spacing/line length errors according to suggestions by codacy/pr
* Fixed docs
Added proper `@returns {*|Array}` as the methods might return either. Also added params where missing (whoops)
* Further doc fixes
Per Crawl's comments, fixed (i + 1) spacing as well as fixed {Integer} to {number}
* random() and randomKey() fix
Per Hydra's comment, random() and randomKey() now ensures unique values.
I've also resolved potential issues with requesting a count higher than the collection size. A collection with 10 items will only ever return at most 10 items using the `count` property.
* Can I facepalm harder
Had wrong header comments ^_^
* Fixed for "values/value" and Omited
Also, added "Positive" integer check.
* looks like I "omitted" a change, there.
* Update Collection.js
* Update Collection.js
* Update Collection.js
* Start rewriting Manager and Connection
* more stuff
* stuff
* Fix ready bug
* some stuff i forgot
* fix some stuff
* add stupid heartbeat ack like seriously who cares
* woo!
* fix a bug
* rate limit the dumb websocket
* stuff
* hdocs
* Docs
* Remove ClientManager#setupKeepAlive as it is now redundant
* Change Client._pingTimestamp to a getter that fetches the timestamp from the WebSocketConnection
* are you happy now eslint smh
* make gus happy
* Add CloseEvent external doc
* Make sure to emit 'reconnecting' when actually reconnecting
* ffs
* Fix RESUME logic
* Add heartbeat ack debug messages, including latency data
* Dumb stuff for Gus
* thx eslint
* more dumb stuff
* more dumb crap smh gus i h8 u
* moar messages
* fix for using wrong status, causing certain events not to be fired (#1422)
* rewrite http
* browser fun
* all the mimes dammit
* i need a newline
* whoops
* forgot about this
* use promises and HTTPRequest.method
* fluent
* move httpclient to external module
* branding
* middleware
* revert middleware
* make role calculated position nicer
* make channels sortable in a nice way too
* stupid git web rebase editor
* Update Guild.js
* Update Guild.js
* Update Guild.js
* Update Guild.js
* Update RESTMethods.js