• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript lang.looseIdentical函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中angular2/src/facade/lang.looseIdentical函数的典型用法代码示例。如果您正苦于以下问题:TypeScript looseIdentical函数的具体用法?TypeScript looseIdentical怎么用?TypeScript looseIdentical使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了looseIdentical函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: isPropertyUpdated

export function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {
  if (!StringMapWrapper.contains(changes, "model")) return false;
  var change = changes["model"];

  if (change.isFirstChange()) return true;
  return !looseIdentical(viewModel, change.currentValue);
}
开发者ID:MingXingTeam,项目名称:awesome-front-end,代码行数:7,代码来源:shared.ts


示例2: get

 get(item, afterIndex) {
   var record;
   for (record = this._head; record !== null; record = record._nextDup) {
     if ((afterIndex === null || afterIndex < record.currentIndex) && looseIdentical(record.item, item)) {
       return record;
     }
   }
   return null;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:9,代码来源:iterable_changes.ts


示例3: iterateListLike

 iterateListLike(collection, (item) => {
   if (record === null || !looseIdentical(record.item, item)) {
     record = this._mismatch(record, item, index);
     mayBeDirty = true;
   } else if (mayBeDirty) {
     record = this._verifyReinsertion(record, item, index);
   }
   record = record._next;
   index++;
 });
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:10,代码来源:iterable_changes.ts


示例4: KVChangeRecord

 this._forEach(map, (value, key) => {
   var newSeqRecord;
   if (oldSeqRecord !== null && key === oldSeqRecord.key) {
     newSeqRecord = oldSeqRecord;
     if (!looseIdentical(value, oldSeqRecord.currentValue)) {
       oldSeqRecord.previousValue = oldSeqRecord.currentValue;
       oldSeqRecord.currentValue = value;
       this._addToChanges(oldSeqRecord);
     }
   } else {
     seqChanged = true;
     if (oldSeqRecord !== null) {
       oldSeqRecord._next = null;
       this._removeFromSeq(lastOldSeqRecord, oldSeqRecord);
       this._addToRemovals(oldSeqRecord);
     }
     if (MapWrapper.contains(records, key)) {
       newSeqRecord = MapWrapper.get(records, key);
     } else {
       newSeqRecord = new KVChangeRecord(key);
       MapWrapper.set(records, key, newSeqRecord);
       newSeqRecord.currentValue = value;
       this._addToAdditions(newSeqRecord);
     }
   }
   if (seqChanged) {
     if (this._isInRemovals(newSeqRecord)) {
       this._removeFromRemovals(newSeqRecord);
     }
     if (lastNewSeqRecord == null) {
       this._mapHead = newSeqRecord;
     } else {
       lastNewSeqRecord._next = newSeqRecord;
     }
   }
   lastOldSeqRecord = oldSeqRecord;
   lastNewSeqRecord = newSeqRecord;
   oldSeqRecord = oldSeqRecord === null ? null : oldSeqRecord._next;
 });
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:39,代码来源:keyvalue_changes.ts


示例5: check

 check(collection) {
   this._reset();
   var record = this._itHead;
   var mayBeDirty = false;
   var index;
   var item;
   if (ListWrapper.isList(collection)) {
     var list = collection;
     this._length = collection.length;
     for (index = 0; index < this._length; index++) {
       item = list[index];
       if (record === null || !looseIdentical(record.item, item)) {
         record = this._mismatch(record, item, index);
         mayBeDirty = true;
       } else if (mayBeDirty) {
         record = this._verifyReinsertion(record, item, index);
       }
       record = record._next;
     }
   } else {
     index = 0;
     iterateListLike(collection, (item) => {
       if (record === null || !looseIdentical(record.item, item)) {
         record = this._mismatch(record, item, index);
         mayBeDirty = true;
       } else if (mayBeDirty) {
         record = this._verifyReinsertion(record, item, index);
       }
       record = record._next;
       index++;
     });
     this._length = index;
   }
   this._truncate(record);
   this._collection = collection;
   return this.isDirty;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:37,代码来源:iterable_changes.ts


示例6: toString

 toString() {
   return looseIdentical(this.previousValue, this.currentValue) ? stringify(this.key) : (stringify(this.key) + '[' + stringify(this.previousValue) + '->' + stringify(this.currentValue) + ']');
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:3,代码来源:keyvalue_changes.ts


示例7: _haveSameDirIndex

 // TODO(vicb): optimize excludedIdxs.indexOf (sorted array)
 rr => excludedIdxs.indexOf(rr.selfIndex) == -1 && rr.mode !== RecordType.DirectiveLifecycle &&
       _haveSameDirIndex(rr, record) && rr.mode === record.mode &&
       looseIdentical(rr.funcOrValue, record.funcOrValue) &&
       rr.contextIndex === record.contextIndex && looseIdentical(rr.name, record.name) &&
       ListWrapper.equals(rr.args, record.args));
开发者ID:0oAimZo0,项目名称:Angular2Learning,代码行数:6,代码来源:coalesce.ts


示例8: _sameDirIndex

 rs, (rr) => rr.mode !== RecordType.DIRECTIVE_LIFECYCLE && _sameDirIndex(rr, r) &&
             rr.mode === r.mode && looseIdentical(rr.funcOrValue, r.funcOrValue) &&
             rr.contextIndex === r.contextIndex && looseIdentical(rr.name, r.name) &&
             ListWrapper.equals(rr.args, r.args));
开发者ID:goderbauer,项目名称:angular,代码行数:4,代码来源:coalesce.ts



注:本文中的angular2/src/facade/lang.looseIdentical函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript lang.normalizeBlank函数代码示例发布时间:2022-05-25
下一篇:
TypeScript lang.isType函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap