* Get the current user agent * @method userAgent * @memberof StreamClient.prototype * @return {string} current user agent
()
| 445 | * @return {string} current user agent |
| 446 | */ |
| 447 | userAgent() { |
| 448 | if (typeof process === 'undefined' || process.env.PACKAGE_VERSION === undefined) { |
| 449 | // eslint-disable-next-line |
| 450 | return `stream-javascript-client-${this.node ? 'node' : 'browser'}-${require('../package.json').version}`; |
| 451 | } |
| 452 | |
| 453 | return `stream-javascript-client-${this.node ? 'node' : 'browser'}-${process.env.PACKAGE_VERSION}`; |
| 454 | } |
| 455 | |
| 456 | /** |
| 457 | * Returns a token that allows only read operations |
no outgoing calls
no test coverage detected