* @name samsam.isElement * @param Object object * * Returns ``true`` if ``object`` is a DOM element node. Unlike * Underscore.js/lodash, this function will return ``false`` if ``object`` * is an *element-like* object, i.e. a regular object with a ``nodeType`` * property
(object)
| 92 | * property that holds the value ``1``. |
| 93 | */ |
| 94 | function isElement(object) { |
| 95 | if (!object || object.nodeType !== 1 || !div) { return false; } |
| 96 | try { |
| 97 | object.appendChild(div); |
| 98 | object.removeChild(div); |
| 99 | } catch (e) { |
| 100 | return false; |
| 101 | } |
| 102 | return true; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * @name samsam.keys |
no test coverage detected
searching dependent graphs…