UNPKG

609 BJavaScriptView Raw
1// constructor
2function UserAgent() {} // public
3
4
5UserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';
6export var appendToCognitoUserAgent = function appendToCognitoUserAgent(content) {
7 if (!content) {
8 return;
9 }
10
11 if (UserAgent.prototype.userAgent && !UserAgent.prototype.userAgent.includes(content)) {
12 UserAgent.prototype.userAgent = UserAgent.prototype.userAgent.concat(' ', content);
13 }
14
15 if (!UserAgent.prototype.userAgent || UserAgent.prototype.userAgent === '') {
16 UserAgent.prototype.userAgent = content;
17 }
18}; // class for defining the amzn user-agent
19
20export default UserAgent;
\No newline at end of file