1 |
|
2 | function UserAgent() {}
|
3 |
|
4 | UserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';
|
5 |
|
6 | export const appendToCognitoUserAgent = content => {
|
7 | if (!content) {
|
8 | return;
|
9 | }
|
10 | if (
|
11 | UserAgent.prototype.userAgent &&
|
12 | !UserAgent.prototype.userAgent.includes(content)
|
13 | ) {
|
14 | UserAgent.prototype.userAgent = UserAgent.prototype.userAgent.concat(
|
15 | ' ',
|
16 | content
|
17 | );
|
18 | }
|
19 | if (!UserAgent.prototype.userAgent || UserAgent.prototype.userAgent === '') {
|
20 | UserAgent.prototype.userAgent = content;
|
21 | }
|
22 | };
|
23 |
|
24 |
|
25 | export default UserAgent;
|