Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81162 views
1
/**
2
* Copyright 2013-2014, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
* @providesModule isTextNode
10
* @typechecks
11
*/
12
13
var isNode = require('isNode');
14
15
/**
16
* @param {*} object The object to check.
17
* @return {boolean} Whether or not the object is a DOM text node.
18
*/
19
function isTextNode(object) {
20
return isNode(object) && object.nodeType == 3;
21
}
22
23
module.exports = isTextNode;
24
25