Minor updates

This commit is contained in:
Adina Țeudan 2022-01-12 22:04:43 +02:00
parent 51f3d7502b
commit fad201fcc6
3 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,7 @@ export interface QueryParam {
*/
export abstract class GenericService<I> {
protected readonly _http = this._injector.get(HttpClient);
private readonly _lastCheckedForChanges = new Map<string, string>([[ROOT_CHANGES_KEY, '0']]);
protected readonly _lastCheckedForChanges = new Map<string, string>([[ROOT_CHANGES_KEY, '0']]);
protected constructor(protected readonly _injector: Injector, protected readonly _defaultModelPath: string) {}

View File

@ -4,6 +4,7 @@ import { HttpClient } from '@angular/common/http';
import { tap } from 'rxjs/operators';
import { HeadersConfiguration, mapEach, RequiredParam, Validate } from '../utils';
/* WIP, not used */
@Injectable()
export abstract class StatsService<E, I = E> {
private readonly _http = this._injector.get(HttpClient);

View File

@ -1,6 +1,7 @@
import { tap } from 'rxjs/operators';
import { ITrackable } from '../listing/models/trackable';
import { MonoTypeOperatorFunction } from 'rxjs';
import moment from 'moment';
export function capitalize(value: string): string {
if (!value) {
@ -19,7 +20,7 @@ export function humanize(value: string, lowercase = true): string {
}
export function log<T>(): MonoTypeOperatorFunction<T> {
return tap<T>(res => console.log(res));
return tap<T>(res => console.log(`%c[${moment().format('HH:mm:ss.SSS')}]`, 'color: yellow;', res));
}
export function toNumber(str: string): number {