博客 / 列表

oneday - underscore源碼解讀系列之一--underscore的一些工具函數

首先看一些在object塊定義的常用的類型判斷函數。 _.isElement(object) _.isElement = function(obj) { return !!(obj obj.nodeType === 1); }; nodeType相關知識點: 節點類型 描述 名稱 1 Element 元素 ELEM

underscore