Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helpers): new method objectEntry #2123

Merged
merged 4 commits into from
May 3, 2023

Conversation

suyashgulati
Copy link
Contributor

@suyashgulati suyashgulati commented May 3, 2023

For issue #1764, added a new helper method named faker.helpers.objectEntry that will return a random key-value pair from the given object.

Changes made:

  • Added a new method faker.helpers.objectEntry
  • Added tests and updated snapshots

@suyashgulati suyashgulati requested a review from a team as a code owner May 3, 2023 11:35
src/modules/helpers/index.ts Outdated Show resolved Hide resolved
src/modules/helpers/index.ts Outdated Show resolved Hide resolved
src/modules/helpers/index.ts Outdated Show resolved Hide resolved
test/helpers.spec.ts Outdated Show resolved Hide resolved
test/helpers.spec.ts Outdated Show resolved Hide resolved
test/helpers.spec.ts Outdated Show resolved Hide resolved
@matthewmayer matthewmayer changed the title feat(helpers): Added new helper method 'ObjectEntry' feat(helpers): Added new helper method 'objectEntry' May 3, 2023
@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #2123 (a66826a) into next (ede6ffa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2123   +/-   ##
=======================================
  Coverage   99.58%   99.59%           
=======================================
  Files        2605     2605           
  Lines      244944   244969   +25     
  Branches     1250     1249    -1     
=======================================
+ Hits       243939   243968   +29     
+ Misses        978      974    -4     
  Partials       27       27           
Impacted Files Coverage Δ
src/modules/helpers/index.ts 99.09% <100.00%> (+0.01%) ⬆️

... and 2 files with indirect coverage changes

@Shinigami92 Shinigami92 added c: feature Request for new feature p: 1-normal Nothing urgent m: helpers Something is referring to the helpers module labels May 3, 2023
@suyashgulati
Copy link
Contributor Author

@Shinigami92 Can you also assign issue #1764 to me as well.

@Shinigami92 Shinigami92 linked an issue May 3, 2023 that may be closed by this pull request
@Shinigami92
Copy link
Member

@Shinigami92 Can you also assign issue #1764 to me as well.

github doesn't let me select you, maybe you need to write a comment there

src/modules/helpers/index.ts Outdated Show resolved Hide resolved
src/modules/helpers/index.ts Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 changed the title feat(helpers): Added new helper method 'objectEntry' feat(helpers): new method objectEntry May 3, 2023
@ST-DDT ST-DDT merged commit c092aa1 into faker-js:next May 3, 2023
19 checks passed
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 m: helpers Something is referring to the helpers module p: 1-normal Nothing urgent
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add faker.helpers.objectEntry
5 participants