nan.js 934 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. "use strict";
  6. // Make this available to both AMD and CJS environments
  7. define(function (require, exports, module) {
  8. // Dependencies
  9. const React = require("devtools/client/shared/vendor/react");
  10. // Shortcuts
  11. const { span } = React.DOM;
  12. /**
  13. * Renders a NaN object
  14. */
  15. const NaNRep = React.createClass({
  16. displayName: "NaN",
  17. render: function () {
  18. return (
  19. span({className: "objectBox objectBox-nan"},
  20. "NaN"
  21. )
  22. );
  23. }
  24. });
  25. function supportsObject(object, type) {
  26. return type == "NaN";
  27. }
  28. // Exports from this module
  29. exports.NaNRep = {
  30. rep: NaNRep,
  31. supportsObject: supportsObject
  32. };
  33. });