UNPKG

ngx-soundmanager2

Version:
50 lines 1.45 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ import { Pipe } from '@angular/core'; var HumanTimePipe = /** @class */ (function () { function HumanTimePipe() { } /** * @param {?} value * @return {?} */ HumanTimePipe.prototype.transform = /** * @param {?} value * @return {?} */ function (value) { var /** @type {?} */ min = (value / 1000 / 60) << 0; var /** @type {?} */ sec = Math.round((value / 1000) % 60); return this.pad(min) + ':' + this.pad(sec); }; /** * Pads string with zeros if less than 10 * @param {?} d * @return {?} */ HumanTimePipe.prototype.pad = /** * Pads string with zeros if less than 10 * @param {?} d * @return {?} */ function (d) { return (d < 10) ? '0' + d.toString() : d.toString(); }; HumanTimePipe.decorators = [ { type: Pipe, args: [{ name: 'humanTime' },] } ]; return HumanTimePipe; }()); export { HumanTimePipe }; function HumanTimePipe_tsickle_Closure_declarations() { /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ HumanTimePipe.decorators; /** * @nocollapse * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} */ HumanTimePipe.ctorParameters; } //# sourceMappingURL=human-time.pipe.js.map