mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-17 19:35:06 +00:00
add jq translation
This commit is contained in:
1 parent
100fb3620a
commit
9abe955027
4 files changed
+95
No files matched your search
@@ -0,0 +1,22 @@
|
||||
"OMGHAI!",
|
||||
(
|
||||
[
|
||||
{ name: "+5 Dexterity Vest", sell_in: 10, quality: 20 },
|
||||
{ name: "Aged Brie", sell_in: 2, quality: 0 },
|
||||
{ name: "Elixir of the Mongoose", sell_in: 5, quality: 7 },
|
||||
{ name: "Sulfuras, Hand of Ragnaros", sell_in: 0, quality: 80 },
|
||||
{ name: "Sulfuras, Hand of Ragnaros", sell_in: 1, quality: 80 },
|
||||
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 15, quality: 20 },
|
||||
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 10, quality: 49 },
|
||||
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 5, quality: 49 },
|
||||
{ name: "Conjured Mana Cake", sell_in: 3, quality: 6} # <-- :O
|
||||
] |
|
||||
{ items: ., day: 0 } |
|
||||
recurse(.day += 1 | .items = [.items[] | update_quality]; .day < ($ARGS.named.days // 2 | tonumber)) |
|
||||
(
|
||||
"",
|
||||
(["-------- day ", (.day | tostring), " --------"] | add),
|
||||
("name, sellIn, quality"),
|
||||
(.items[] | [.name, .sell_in, .quality | tostring] | join(", "))
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user