feat: remove MapWrapper.contains().

This commit is contained in:
Martin Probst
2015-06-17 21:42:56 -07:00
parent be7ac9fd41
commit dfd30910aa
18 changed files with 28 additions and 30 deletions

View File

@ -5,7 +5,7 @@ export class Locals {
constructor(public parent: Locals, public current: Map<any, any>) {}
contains(name: string): boolean {
if (MapWrapper.contains(this.current, name)) {
if (this.current.has(name)) {
return true;
}
@ -17,7 +17,7 @@ export class Locals {
}
get(name: string) {
if (MapWrapper.contains(this.current, name)) {
if (this.current.has(name)) {
return this.current.get(name);
}
@ -32,7 +32,7 @@ export class Locals {
// TODO(rado): consider removing this check if we can guarantee this is not
// exposed to the public API.
// TODO: vsavkin maybe it should check only the local map
if (MapWrapper.contains(this.current, name)) {
if (this.current.has(name)) {
this.current.set(name, value);
} else {
throw new BaseException(

View File

@ -105,7 +105,7 @@ export class KeyValueChanges extends Pipe {
this._removeFromSeq(lastOldSeqRecord, oldSeqRecord);
this._addToRemovals(oldSeqRecord);
}
if (MapWrapper.contains(records, key)) {
if (records.has(key)) {
newSeqRecord = records.get(key);
} else {
newSeqRecord = new KVChangeRecord(key);