Skip to content

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 23, 2022

I did not benchmark

Checklist

Copy link
Member

@ivan-tymoshenko ivan-tymoshenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, does it really make a difference?

@mcollina
Copy link
Member

it's not about perf, it's about protecting from prototype injection

@Uzlopak Uzlopak changed the title use hasOwnProperty from prototype use hasOwnProperty from Object.prototype Aug 23, 2022
@Uzlopak Uzlopak merged commit cd586bf into master Aug 23, 2022
@Uzlopak Uzlopak deleted the use-hasOwnProperty branch August 23, 2022 08:16
mcollina pushed a commit that referenced this pull request Aug 29, 2022
* Improved performance for const schema

* Improve const object schema performance

* Improve string and object performance

* Restored example file

* Changed findIndex with indexOf

* Removed useless inference when schema is const

* Review requests
- Removed switchTypeSchema
- Use of variable isRequired where defined
- Rebase to PR #510
- Remove use of default value for const

* Rebase to #510 (use hasOwnProperty from Object.prototype)

* Use isRequired when available

* Restored FJS format style

* Restore FJS format style

* Added support for nullable / type: [..., 'null']
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.

4 participants