rexxars/vinmonopolet

View on GitHub
src/models/RawMaterial.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
function RawMaterial(mat) {
  this.id = mat.id
  this.name = mat.name
  this.percentage = mat.percentage ? Number(mat.percentage) : null
}

RawMaterial.prototype.toString = function () {
  return this.name
}

module.exports = RawMaterial