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

+functions defined in jsonata behave normall in js #26

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

geoffhendrey
Copy link
Contributor

Description

hopefully this is not a breaking change and just makes functiond defined in jsonata expression callable like normal functions outside of stated.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • [ x] Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@geoffhendrey geoffhendrey requested a review from a team as a code owner November 23, 2023 02:17
wrappedFunction._stated_function__ = true;

//preserve backward compatibility with code that may be expecting to call the jsonata apply function
wrappedFunction.apply = (_this, args)=>{
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is neat

@geoffhendrey geoffhendrey merged commit 4c2740a into main Nov 27, 2023
1 check passed
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.

3 participants