mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
More consistent syntax
This commit is contained in:
parent
b45e9b7cf2
commit
564c39defb
@ -38,13 +38,9 @@ function updateItemSellIn({name, sellIn}: Item) {
|
||||
}
|
||||
|
||||
function updateItemQuality({name, quality, sellIn, ...rest}: Item): number {
|
||||
if (name === 'Sulfuras, Hand of Ragnaros') {
|
||||
return quality
|
||||
}
|
||||
if (name === 'Sulfuras, Hand of Ragnaros') return quality
|
||||
|
||||
if (name == 'Aged Brie') {
|
||||
return incrementQuality({quality});
|
||||
}
|
||||
if (name == 'Aged Brie') return incrementQuality({quality});
|
||||
|
||||
if (name == 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
let itemCopy = { name, quality, sellIn, ...rest }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user