UNPKG

803 BJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = exports.appendToCognitoUserAgent = void 0;
5
6// constructor
7function UserAgent() {} // public
8
9
10UserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';
11
12var appendToCognitoUserAgent = function appendToCognitoUserAgent(content) {
13 if (!content) {
14 return;
15 }
16
17 if (UserAgent.prototype.userAgent && !UserAgent.prototype.userAgent.includes(content)) {
18 UserAgent.prototype.userAgent = UserAgent.prototype.userAgent.concat(' ', content);
19 }
20
21 if (!UserAgent.prototype.userAgent || UserAgent.prototype.userAgent === '') {
22 UserAgent.prototype.userAgent = content;
23 }
24}; // class for defining the amzn user-agent
25
26
27exports.appendToCognitoUserAgent = appendToCognitoUserAgent;
28var _default = UserAgent;
29exports["default"] = _default;
\No newline at end of file