Skip to content

Commit

Permalink
Fix filterProps documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TyMick committed Jan 4, 2021
1 parent 3240dd4 commit da75a5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/utils/filter-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
* @param {object} props - A props object.
* @param {(string[] | object)} filterPropNames - An array of prop names to filter by (or a prop
* types object with keys to filter by).
* @returns {{ matchingProps: object, remainingProps: object }} An array of two props objects: the
* first containing the props that match the filter and the second containing the rest.
* @returns {{ matchingProps: object, remainingProps: object }} An object containing two props
* objects: one containing the props that match the filter and the other containing the props that
* don't match.
*/
export function filterProps(props, filterPropNames) {
const filterList = Array.isArray(filterPropNames)
Expand Down

0 comments on commit da75a5d

Please sign in to comment.