Skip to content
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

Canocalize output of toJSON instead of relying on JSON.stringify #6

Closed
wants to merge 1 commit into from

Conversation

frosty5689
Copy link

PR related to #5

Sorry, it took so long for me to create a PR.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 30

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-5.7%) to 94.286%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/canonicalize.js 2 3 66.67%
Totals Coverage Status
Change from base Build 29: -5.7%
Covered Lines: 14
Relevant Lines: 15

💛 - Coveralls

@erdtman
Copy link
Owner

erdtman commented Nov 15, 2021

Awesome, could you add your example from #5 as a test-case before we merge this.

return JSON.stringify(object);
}

if (object.toJSON != null) {
Copy link
Owner

Choose a reason for hiding this comment

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

How about changing this to instanceof Function instead

@erdtman erdtman closed this Nov 26, 2021
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.

None yet

3 participants