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

inclusion-numerique / coop-mediation-numerique / ac5796ce-2060-42b0-8ac2-9a33dfeae3db

22 May 2026 08:08AM UTC coverage: 9.999% (+3.0%) from 6.955%
ac5796ce-2060-42b0-8ac2-9a33dfeae3db

Pull #499

circleci

web-flow
chore(deps): bump @tootallnate/once from 2.0.0 to 2.0.1

Bumps [@tootallnate/once](https://github.com/TooTallNate/once) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/TooTallNate/once/releases)
- [Changelog](https://github.com/TooTallNate/once/blob/v2.0.1/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/once/compare/2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: "@tootallnate/once"
  dependency-version: 2.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #499: chore(deps): bump @tootallnate/once from 2.0.0 to 2.0.1

689 of 10876 branches covered (6.34%)

Branch coverage included in aggregate %.

2112 of 17137 relevant lines covered (12.32%)

1.95 hits per line

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

33.33
/apps/web/src/app/api/v1/transformJsonApiQueryParamsToObject.ts
1
import { set } from 'lodash-es'
1✔
2

3
/**
4
 * Json:api query params are given as string in brackets, e.g. "page[size]"
5
 * So the NextUrl SearchParams looks like { 'page[size]': '10' }
6
 * This function transforms them to object, e.g. { page: { size: 10 } }
7
 * To be able to be passed later to zod validation.
8
 *
9
 * A parameter with multiple values is given as a comma separated string, e.g. "sort=age,city"
10
 * and is transformed to an array, e.g. { sort: ['age', 'city'] }
11
 *
12
 * See https://jsonapi.org/format/#query-parameters-families
13
 */
14

15
export const transformJsonApiQueryParamsToObject = (
1✔
16
  params: URLSearchParams,
17
): Record<string, unknown> => {
18
  const result: Record<string, unknown> = {}
1✔
19

20
  for (const [rawKey, rawValue] of params.entries()) {
1✔
21
    // split rawKey into nested keys: e.g. "page[size]" -> ["page", "size"]
22
    const keys = rawKey.match(/[^[\]]+/g) || []
×
23

24
    // handle multiple values by splitting on comma
25
    const values = rawValue.includes(',') ? rawValue.split(',') : [rawValue]
×
26

27
    const finalValue = values.length === 1 ? values[0] : values
×
28

29
    set(result, keys, finalValue)
×
30
  }
31

32
  return result
1✔
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