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

input-output-hk / atala-prism-wallet-sdk-ts / 8883326918

29 Apr 2024 06:08PM UTC coverage: 68.711% (+2.1%) from 66.649%
8883326918

push

github

web-flow
feat(sdk-verification)!: Implementing DIF Presentation exchange protocol 2.0 for SDK to SDK OOB verification (#196)

Signed-off-by: Pete Vielhaber <peter.vielhaber@iohk.io>
Co-authored-by: Pete Vielhaber <peter.vielhaber@iohk.io>

947 of 1539 branches covered (61.53%)

Branch coverage included in aggregate %.

273 of 363 new or added lines in 17 files covered. (75.21%)

3 existing lines in 3 files now uncovered.

2022 of 2782 relevant lines covered (72.68%)

15.9 hits per line

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

85.19
/src/pollux/utils/DescriptorPath.ts
1

2

3

4

5

6
export class DescriptorPath {
7

8
    constructor(private obj: any) { }
9

10
    getValue(path: string): null | any {
11
        const segments = path.split(/\.|\[|\]/).filter(segment => segment !== '').slice(1)
61✔
12
        let currentObj: any = this.obj;
15✔
13
        for (const segment of segments) {
15✔
14
            if (Array.isArray(currentObj)) {
37✔
15
                const index = parseInt(segment);
9✔
16
                if (isNaN(index) || index >= currentObj.length) {
9!
NEW
17
                    return null
×
18
                }
19
                if (!currentObj[index]) {
9!
NEW
20
                    return null;
×
21
                }
22

23
                currentObj = currentObj[index];
9✔
24
            } else if (currentObj && typeof currentObj === 'object' && currentObj[segment] !== undefined) {
28✔
25
                currentObj = currentObj[segment];
26✔
26
            } else {
27
                return null
2✔
28
            }
29
        }
30
        return currentObj;
13✔
31

32
    }
33
}
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