Produces the value of a block string from its parsed raw value, similar to Coffeescript's block string, Python's docstring trim or Ruby's strip_heredoc.
Produces the value of a block string from its parsed raw value, similar to Coffeescript's block string, Python's docstring trim or Ruby's strip_heredoc.
This implements the GraphQL spec's BlockStringValue() static algorithm.
Computes the lexical distance between strings A and B.
Computes the lexical distance between strings A and B.
The "distance" between two strings is given by counting the minimum number of edits needed to transform string A into string B. An edit can be an insertion, deletion, or substitution of a single character, or a swap of two adjacent characters.
This distance can be useful for detecting typos in input or sorting
distance in number of edits
Given [ A, B, C ] return '"A", "B" or "C"'.
Given an invalid input string and a list of valid options, returns a filtered list of valid options sorted based on their similarity with the input.