node-utils-extend
v1.0.7
Published
A Collection of useful utility functions
Downloads
4
Readme
Functions
randomElement(arr) ⇒ T
Kind: global function
| Param | Type | | --- | --- | | arr | Array.<T> |
randomFloat(min, max) ⇒ Number
Kind: global function
| Param | Type | | --- | --- | | min | Number | | max | Number |
randomInt(min, max) ⇒ Number
Kind: global function
| Param | Type | | --- | --- | | min | Number | | max | Number |
capitalize(str) ⇒ String
Kind: global function
| Param | Type | | --- | --- | | str | String |
promiseAny(promises) ⇒ Promise.<T>
Rejects if all failise to complete
Kind: global function
| Param | Type | | --- | --- | | promises | Promise.<T> |
arrayChunk(array, size) ⇒ Array.<Array.<T>>
Break array into chunks of x size
Kind: global function
| Param | Type | | --- | --- | | array | Array.<T> | | size | Number |
httpsGetCB(url, path, headers, callback, encode)
Kind: global function
| Param | Type | Default | | --- | --- | --- | | url | String | | | path | String | | | headers | http.OutgoingHttpHeaders | | | callback | function | | | encode | Boolean | true |
httpsGet(url, path, headers, encode) ⇒ Promise.<Object>
A Promise based https get
Kind: global function
| Param | Type | Default | | --- | --- | --- | | url | String | | | path | String | | | headers | http.OutgoingHttpHeaders | | | encode | Boolean | true |
httpGetCB(url, path, headers, callback, encode)
Kind: global function
| Param | Type | Default | | --- | --- | --- | | url | String | | | path | String | | | headers | http.OutgoingHttpHeaders | | | callback | function | | | encode | Boolean | true |
httpGet(url, path, headers, encode) ⇒ Promise.<Object>
A Promise based http get
Kind: global function
| Param | Type | Default | | --- | --- | --- | | url | String | | | path | String | | | headers | http.OutgoingHttpHeaders | | | encode | Boolean | true |