Skip to content

Conversation

@scottdykes1611
Copy link

@scottdykes1611 scottdykes1611 commented Nov 11, 2020

What

Created a toBeWithinPercent function to check if a number is within x percent of a target number, and toContainKeysWithinPercent function to check if an object contains keys and if the keys' values are within x percent of a target number.

Why

To be used similarly to the toBeWithin function, but sometimes a percentage is needed rather than a range.

The toContainKeysWithinPercent function is for a similar purpose but for use within an object.

Notes

Housekeeping

  • Unit tests
  • Documentation is up to date
  • No additional lint warnings
  • Typescript definitions are added/updated where relevant

@scottdykes1611 scottdykes1611 changed the title Created toBeWithinPercent Created toBeWithinPercent and toContainKeysWithinPercent Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant