You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isTextNode.js.flow 496 B

пре 3 година
123456789101112131415161718192021
  1. /**
  2. * Copyright (c) 2013-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @providesModule isTextNode
  8. * @typechecks
  9. */
  10. const isNode = require('./isNode');
  11. /**
  12. * @param {*} object The object to check.
  13. * @return {boolean} Whether or not the object is a DOM text node.
  14. */
  15. function isTextNode(object) {
  16. return isNode(object) && object.nodeType == 3;
  17. }
  18. module.exports = isTextNode;