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

Provide original_str in node bindings #96

Closed
Pierrci opened this issue Jan 21, 2020 · 1 comment · Fixed by #118
Closed

Provide original_str in node bindings #96

Pierrci opened this issue Jan 21, 2020 · 1 comment · Fixed by #118
Labels
enhancement New feature or request

Comments

@Pierrci
Copy link
Member

Pierrci commented Jan 21, 2020

When using the node bindings, there is no way for now to map back to the original string like it's possible in python or rust with output.original_str[output.offsets[1]]

@Pierrci Pierrci added the enhancement New feature or request label Jan 21, 2020
@Pierrci
Copy link
Member Author

Pierrci commented Jan 24, 2020

@n1t0 I would go for a getOriginalString(begin?: number, end?: number) method with the same behavior than array.slice:

  • If no parameter, return the entire original string
  • If only first parameter, return the original string starting at the index
  • If two parameters, return the original string between the two indexes (stopping before the second one)

wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant