MCPcopy Create free account
hub / github.com/GetStream/stream-js / userAgent

Method userAgent

src/client.ts:447–454  ·  view source on GitHub ↗

* Get the current user agent * @method userAgent * @memberof StreamClient.prototype * @return {string} current user agent

()

Source from the content-addressed store, hash-verified

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

Callers 4

enrichKwargsMethod · 0.95
test.tsFile · 0.80
client_test.jsFile · 0.80
client_test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected