Skip to content

Commit

Permalink
chore(examples): add escaped pattern example
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Kraus committed Apr 16, 2024
1 parent cac6f14 commit 762a9f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ console.log(parsePattern('["a", "b c", "d" ...'));
console.log(createLoosePattern(input)); //=> '[1, 2, 3, 4, 5, 6]'
console.log(createLoosePattern(input, 5)); //=> '[1, 2 ...'
}

{
const input = `a
b`;
console.log(looseStringTest(input, input));
console.log(looseStringTest(`"${input}"`, input));
console.log(looseStringTest('"a\nb"', input));
}

0 comments on commit 762a9f8

Please sign in to comment.