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

Add JSON.parse utility to the "jexl function library" #4280

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/core/util/jexl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default function (/* config?: any*/): JexlNonBuildable {
)
j.addFunction('toLowerCase', (s: string) => s.toLowerCase())
j.addFunction('toUpperCase', (s: string) => s.toUpperCase())
j.addFunction('jsonParse', (s: string) => JSON.parse(s))
j.addFunction('trim', (s: string) => s.trim())
j.addFunction('trimEnd', (s: string) => s.trimEnd())
j.addFunction('trimStart', (s: string) => s.trimStart())
Expand Down
2 changes: 1 addition & 1 deletion test_data/volvox/volvox.sort.gff3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# multi-exon gene - several linked CDSs
# single exon gene - one CDS only
##gff-version 3
ctgA example contig 1 50001 . . . Name=ctgA;multivalue=val1,val2,val3
ctgA example contig 1 50001 . . . Name=ctgA;multivalue=val1,val2,val3;table=%5B%7B%22name%22%3A%22hello1%22%2C%22value%22%3A1%7D%2C%7B%22name%22%3A%22hello2%22%2C%22value%22%3A2%7D%2C%7B%22name%22%3A%22hello3%22%2C%22value%22%3A3%7D%2C%7B%22name%22%3A%22hello4%22%2C%22value%22%3A4%7D%2C%7B%22name%22%3A%22hello5%22%2C%22value%22%3A5%7D%5D
ctgA example BAC 1000 20000 . . . ID=b101.2;Name=b101.2;Note=Fingerprinted BAC with end reads
ctgA example SNP 1000 1000 0.987 . . ID=FakeSNP1;Name=FakeSNP;Note=This is a fake SNP that should appear at 1000 with length 1
ctgA example clone_start 1000 1500 . + . Parent=b101.2
Expand Down
Loading