1 |
|
2 | function UserAgent() {}
|
3 |
|
4 |
|
5 | UserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';
|
6 | export 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 | };
|
19 |
|
20 | export default UserAgent; |
\ | No newline at end of file |