UNPKG

@ginstone/nga-api

Version:

26 lines (25 loc) 650 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Honor = void 0; const StrUtils_1 = require("@ginstone/common-utils/dist/src/utils/StrUtils"); /** * 荣誉称号 */ class Honor { constructor(s) { s = s.trim(); if (!s.includes(" ")) { this.name = s; return; } const split = s.split(" "); this.timestamp = new Date(Number(split[0]) * 1000); const r = (0, StrUtils_1.unEscape)(split[1]); if (r) this.remark = r; if (split.length > 2) { this.name = split[2]; } } } exports.Honor = Honor;