Skip to content

feat: introduce resolveLocaleData utility function#3819

Closed
ST-DDT wants to merge 2 commits into
feat/samfn/utilsfrom
feat/samfn/utils-resolveLocaleData
Closed

feat: introduce resolveLocaleData utility function#3819
ST-DDT wants to merge 2 commits into
feat/samfn/utilsfrom
feat/samfn/utils-resolveLocaleData

Conversation

@ST-DDT
Copy link
Copy Markdown
Member

@ST-DDT ST-DDT commented Apr 19, 2026

Extracted from #3189 for future discussion
Blocked by #3818


Adds the resolveLocaleData utility function.

Intended for users of our library to check whether their custom data are present.

@example
resolveLocaleData(fakerCore, 'food', 'fruit'); // ['apple', 'apricot', ...]
arrayElement(fakerCore, resolveLocaleData(fakerCore, 'food', 'fruit')); // 'cherry'

@ST-DDT ST-DDT added this to the vFuture milestone Apr 19, 2026
@ST-DDT ST-DDT self-assigned this Apr 19, 2026
@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision labels Apr 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.84%. Comparing base (65e54b5) to head (b8a9eaf).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           feat/samfn/utils    #3819      +/-   ##
====================================================
- Coverage             98.90%   98.84%   -0.07%     
====================================================
  Files                   902      902              
  Lines                  3107     3114       +7     
  Branches                556      573      +17     
====================================================
+ Hits                   3073     3078       +5     
- Misses                   30       32       +2     
  Partials                  4        4              
Files with missing lines Coverage Δ
src/utils/registry.ts 100.00% <ø> (ø)
src/utils/resolve-locale-data.ts 100.00% <100.00%> (ø)

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ST-DDT ST-DDT force-pushed the feat/samfn/utils branch from 240de0a to 65e54b5 Compare April 19, 2026 16:31
@ST-DDT ST-DDT force-pushed the feat/samfn/utils-resolveLocaleData branch from f726aa0 to b8a9eaf Compare April 19, 2026 16:34
@ST-DDT
Copy link
Copy Markdown
Member Author

ST-DDT commented Apr 20, 2026

This is now obsolete since we will continue to use the LocaleProxy, which makes it easier to call.

@ST-DDT ST-DDT closed this Apr 20, 2026
@ST-DDT ST-DDT added wontfix This will not be worked on and removed s: needs decision Needs team/maintainer decision labels Apr 20, 2026
@ST-DDT ST-DDT removed this from the vFuture milestone Apr 20, 2026
@ST-DDT ST-DDT deleted the feat/samfn/utils-resolveLocaleData branch April 20, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature p: 1-normal Nothing urgent wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant