Created
July 27, 2019 11:23
-
-
Save jasongorman/c5f252a8a6cf56b086e922d9ad43e285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
receive(batch) { | |
batch.cds.forEach((received) => { | |
let cd = this.catalogue.search(received.title, received.artist); | |
if (cd == null) { | |
cd = this.catalogue.add(received); | |
} | |
cd.addStock(received.copies); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment