Skip to content

Conversation

karfau
Copy link
Member

@karfau karfau commented Oct 6, 2023

by completely avoiding Object literals.

  • Always use Object.create(null)
  • freeze now creates a copy of the passed object without a prototype
  • added hasOwn that mimics Object.hasOwn (not part of ES5)
  • add ESLint rule no-prototype-builtins to get feedback as early as possible

karfau added 2 commits October 6, 2023 21:43
by completely avoiding Object literals.
- Always use `Object.create(null)`
- `freeze` now creates a copy of the passed object without a prototype
- added `hasOwn` that mimics `Object.hasOwn` (not part of ES5)
- add ESLint rule `no-prototype-builtins` to get feedback as early as possible
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (642c9e8) 93.88% compared to head (d0e0a2a) 93.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #554      +/-   ##
==========================================
+ Coverage   93.88%   93.89%   +0.01%     
==========================================
  Files           8        8              
  Lines        2044     2048       +4     
  Branches      531      532       +1     
==========================================
+ Hits         1919     1923       +4     
  Misses        125      125              
Files Coverage Δ
lib/conventions.js 100.00% <100.00%> (ø)
lib/dom-parser.js 93.56% <100.00%> (ø)
lib/dom.js 90.04% <100.00%> (-0.02%) ⬇️
lib/sax.js 98.18% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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