Skip to content

Commit

Permalink
No more expose extra properties with profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesboeufs committed Feb 17, 2021
1 parent cb55aa2 commit 42ff69c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/validate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ async function prevalidate(file, options = {}) {
const {fileValidation} = validateFile({linebreak, encoding, delimiter})

const profilesValidation = mapValues(profiles, profile => {
return {...profile, isValid: profile.isValid({fileValidation, fields, notFoundFields, uniqueErrors})}
const {code, name} = profile
return {code, name, isValid: profile.isValid({fileValidation, fields, notFoundFields, uniqueErrors})}
})

return {
Expand Down

0 comments on commit 42ff69c

Please sign in to comment.