UNPKG

@aca-1/a2-composer

Version:
26 lines 813 B
import * as faker from 'faker'; var CHAR_LIST = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV'; var MockClass = (function () { function MockClass() { this.id = ''; this.name = ''; this.name = faker.commerce.department() + ' ' + faker.company.bsNoun(); } MockClass.prototype.match = function (value, field) { return false; }; MockClass.prototype.update = function (data) { return; }; MockClass.prototype.gen_id = function (prefix, cnt) { var id = ''; while (cnt > 0) { id = CHAR_LIST[cnt % CHAR_LIST.length] + id; cnt = Math.floor(cnt / CHAR_LIST.length); } this.id = prefix + id; }; return MockClass; }()); export { MockClass }; //# sourceMappingURL=class.mock.js.map