ngx-soundmanager2
Version:
SoundManager2 Music Player for Angular2+
37 lines • 1.09 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { Pipe } from '@angular/core';
export class HumanTimePipe {
/**
* @param {?} value
* @return {?}
*/
transform(value) {
const /** @type {?} */ min = (value / 1000 / 60) << 0;
const /** @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 {?}
*/
pad(d) {
return (d < 10) ? '0' + d.toString() : d.toString();
}
}
HumanTimePipe.decorators = [
{ type: Pipe, args: [{ name: 'humanTime' },] }
];
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