UNPKG

internet-avatar.js

Version:

Library for connecting to Internet Avatar API.

39 lines (38 loc) 1.03 kB
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; /** * Represents a basic data model. * * @abstract */ var Base = /** @class */ (function () { function Base(client) { this._client = client; } /** * When JSON.stringify is called on this class, this method is called. * We use it to exclude the client property from the output. */ Base.prototype.toJSON = function () { var obj = __assign({}, this); delete obj.client; return obj; }; /** * Returns a string representation of this object. */ Base.prototype.toString = function () { return JSON.stringify(this); }; return Base; }()); export { Base };