mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 16:01:42 +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 {
|
function updateItemQuality({name, quality, sellIn, ...rest}: Item): number {
|
||||||
if (name === 'Sulfuras, Hand of Ragnaros') {
|
if (name === 'Sulfuras, Hand of Ragnaros') return quality
|
||||||
return quality
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name == 'Aged Brie') {
|
if (name == 'Aged Brie') return incrementQuality({quality});
|
||||||
return incrementQuality({quality});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name == 'Backstage passes to a TAFKAL80ETC concert') {
|
if (name == 'Backstage passes to a TAFKAL80ETC concert') {
|
||||||
let itemCopy = { name, quality, sellIn, ...rest }
|
let itemCopy = { name, quality, sellIn, ...rest }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user