Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const borrow = (customer, video) => {
const borrowed = customer.borrowedVideos;
return {
customer: {...customer, borrowedVideos: borrowed.concat([video]) },
video: {...video, onLoan: true, borrower: customer.id }
}
}
module.exports = borrow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment