• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OneBusAway / wayfinder / 13235581165

10 Feb 2025 07:21AM UTC coverage: 8.55% (+3.0%) from 5.526%
13235581165

push

github

web-flow
Merge pull request #170 from OneBusAway/feat/surveys

Feat/surveys

66 of 155 branches covered (42.58%)

Branch coverage included in aggregate %.

90 of 385 new or added lines in 14 files covered. (23.38%)

2 existing lines in 1 file now uncovered.

213 of 3108 relevant lines covered (6.85%)

0.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/lib/utils/user.js
NEW
1
export function getCookie(name) {
×
NEW
2
        const value = `; ${document.cookie}`;
×
NEW
3
        const parts = value.split(`; ${name}=`);
×
NEW
4
        if (parts.length === 2) return parts.pop().split(';').shift();
×
NEW
5
}
×
6

NEW
7
export function getUserId() {
×
NEW
8
        let userId = getCookie('userId');
×
NEW
9
        if (!userId) {
×
NEW
10
                userId = crypto.randomUUID();
×
11

NEW
12
                //! Set cookie for 1 year
×
NEW
13
                document.cookie = `userId=${userId}; path=/; max-age=${60 * 60 * 24 * 365}`;
×
NEW
14
        }
×
NEW
15
        return userId;
×
NEW
16
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc