fabric8-analytics-dependency-editor-jyas
Version:
18 lines • 607 B
JavaScript
import { Pipe } from '@angular/core';
var MaxLengthPipe = /** @class */ (function () {
function MaxLengthPipe() {
}
MaxLengthPipe.prototype.transform = function (value, maxWords) {
return value && value.split(' ').splice(0, maxWords).join(' ').toString() || '';
};
MaxLengthPipe.decorators = [
{ type: Pipe, args: [{
name: 'maxLength'
},] },
];
/** @nocollapse */
MaxLengthPipe.ctorParameters = function () { return []; };
return MaxLengthPipe;
}());
export { MaxLengthPipe };
//# sourceMappingURL=maxlength.pipe.js.map