Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor: Minor safety and modernization updates in processSchema#34

Open
Manas-Dikshit wants to merge 1 commit intowebpack:mainfrom
Manas-Dikshit:main
Open

Refactor: Minor safety and modernization updates in processSchema#34
Manas-Dikshit wants to merge 1 commit intowebpack:mainfrom
Manas-Dikshit:main

Conversation

@Manas-Dikshit
Copy link

@Manas-Dikshit Manas-Dikshit commented Mar 2, 2026

Changes

  • Null and type checks (!json || typeof json !== 'object') have been added for improved recursion safety.
  • Optional chaining (visitor?.method) has been used instead of potentially throwing an error.
  • Object.keys() has replaced the use of for...in for enhanced compatibility.
  • !Array.isArray() checks have been included for object expectations.

Impact

  • No breaking changes have been made.
  • Improved error safety and code clarity.
  • Identical functionality remains for backward compatibility.
  • Compatible with modern Node.js runtimes and linting configurations.

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