UNPKG

@angular/router-deprecated

Version:
33 lines 965 B
import { StringMapWrapper } from '../src/facade/collection'; import { isBlank, isPresent } from '../src/facade/lang'; export class TouchMap { constructor(map) { this.map = {}; this.keys = {}; if (isPresent(map)) { StringMapWrapper.forEach(map, (value /** TODO #9100 */, key /** TODO #9100 */) => { this.map[key] = isPresent(value) ? value.toString() : null; this.keys[key] = true; }); } } get(key) { StringMapWrapper.delete(this.keys, key); return this.map[key]; } getUnused() { var unused = {}; var keys = StringMapWrapper.keys(this.keys); keys.forEach(key => unused[key] = StringMapWrapper.get(this.map, key)); return unused; } } export function normalizeString(obj) { if (isBlank(obj)) { return null; } else { return obj.toString(); } } //# sourceMappingURL=utils.js.map