const nzhhk = require('nzh/hk') export function ponitTransform(dealingRecord) { let { point1, point2, totalPoints } = dealingRecord point1 = Number(point1) point2 = Number(point2) totalPoints = Number(totalPoints) if (point1 === 0 && point2 === 0) { return `白板對` } else if (point1 === point2) { return `對子` } else if (point1 + point2 === 10) { return `尻` } else if (point1 === 0 || point2 === 0) { return `${point1 === 0 ? nzhhk.encodeS(`${point2}`) : nzhhk.encodeS(`${point1}`)}點半` } else { return `${nzhhk.encodeS(`${totalPoints}`)}點` } }