Skip to content

registerFunction capabilty #10

@hyusetiawan

Description

@hyusetiawan

I have this in my JS environment:

registerFunction(
    'distinctById',
    (items: Array<any>) => {
      return uniqBy(items, 'ID')
    },
    '<a<o>:a<o>>',
  )

im using this extension as my jsonata development environment, how do i add this to the extension?
I see there is an $import but that means I need to do $api.distinctById is there a way to call it the way i would use it in prod? which is $distinctById(...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions