UNPKG

my-test123

Version:
29 lines 1.09 kB
import { Pipe } from '@angular/core'; // tslint:disable-next-line:use-pipe-transform-interface var AlmUserName = /** @class */ (function () { function AlmUserName() { } AlmUserName.prototype.transform = function (userObj, notFound) { if (userObj === void 0) { userObj = null; } if (notFound === void 0) { notFound = 'User not found'; } if (typeof (userObj) === 'undefined' || userObj === null) { return notFound; } if (userObj.hasOwnProperty('attributes')) { if (userObj.attributes.hasOwnProperty('fullName')) { if (userObj.attributes.fullName && userObj.attributes.fullName.trim()) { return userObj.attributes.fullName; } } } return ''; }; AlmUserName.decorators = [ { type: Pipe, args: [{ name: 'almUserName', pure: true },] }, ]; /** @nocollapse */ AlmUserName.ctorParameters = function () { return []; }; return AlmUserName; }()); export { AlmUserName }; //# sourceMappingURL=alm-user-name.pipe.js.map