-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
refactor: normalize common options for all parsers #551
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it LGTM, but with the one nit I left so marking as request for change. The nit doesn't have to block, but I think it's a sane addition.
a03daf7
to
3f6cd01
Compare
@jonchurch I've made the requested changes. I think we should merge this first as foundational work for #22, so that when we start on it, the necessary changes are already in place and the scope remains smaller. Let me know what you think! |
ee6ba4c
to
b760930
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b760930
to
d93b76d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lib/utils.js
Outdated
/*! | ||
* body-parser | ||
* Copyright(c) Express Contributors | ||
* MIT Licensed | ||
*/ | ||
|
||
'use strict' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! | |
* body-parser | |
* Copyright(c) Express Contributors | |
* MIT Licensed | |
*/ | |
'use strict' | |
'use strict' |
files should not get copyright headers
Based on #550
This PR introduces the
normalizeOptions
function, which standardizes and validates common parser options likeinflate
,limit
,type
, andverify
. It ensures consistent defaults and removes duplication across the parsers.