Sha256: 0fcc405f22177b7909ce57970ca85eadb4175e8787d3f9568c7df949e0803658

Contents?: true

Size: 1.42 KB

Versions: 165

Compression:

Stored size: 1.42 KB

Contents

"use strict";

exports.__esModule = true;

var _for = require("../core-js/symbol/for");

var _for2 = _interopRequireDefault(_for);

var _symbol = require("../core-js/symbol");

var _symbol2 = _interopRequireDefault(_symbol);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function () {
  var REACT_ELEMENT_TYPE = typeof _symbol2.default === "function" && _for2.default && (0, _for2.default)("react.element") || 0xeac7;
  return function createRawReactElement(type, props, key, children) {
    var defaultProps = type && type.defaultProps;
    var childrenLength = arguments.length - 3;

    if (!props && childrenLength !== 0) {
      props = {};
    }

    if (props && defaultProps) {
      for (var propName in defaultProps) {
        if (props[propName] === void 0) {
          props[propName] = defaultProps[propName];
        }
      }
    } else if (!props) {
      props = defaultProps || {};
    }

    if (childrenLength === 1) {
      props.children = children;
    } else if (childrenLength > 1) {
      var childArray = Array(childrenLength);

      for (var i = 0; i < childrenLength; i++) {
        childArray[i] = arguments[i + 3];
      }

      props.children = childArray;
    }

    return {
      $$typeof: REACT_ELEMENT_TYPE,
      type: type,
      key: key === undefined ? null : '' + key,
      ref: null,
      props: props,
      _owner: null
    };
  };
}();

Version data entries

165 entries across 44 versions & 10 rubygems

Version Path
immosquare-cleaner-0.1.40 node_modules/babel-runtime/helpers/jsx.js
optimacms-0.1.61 spec/dummy/node_modules/babel-runtime/helpers/jsx.js
ilog-0.4.1 node_modules/babel-runtime/helpers/jsx.js
ilog-0.4.0 node_modules/babel-runtime/helpers/jsx.js
ilog-0.3.3 node_modules/babel-runtime/helpers/jsx.js
optimacms-0.4.3 spec/dummy/node_modules/babel-runtime/helpers/jsx.js
optimacms-0.4.2 spec/dummy/node_modules/babel-runtime/helpers/jsx.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/babel-runtime/helpers/jsx.js
lux_assets-0.2.11 ./node_modules/babel-runtime/helpers/jsx.js
lux_assets-0.2.9 ./node_modules/babel-runtime/helpers/jsx.js
lux_assets-0.2.4 ./node_modules/babel-runtime/helpers/jsx.js
lux_assets-0.2.2 ./node_modules/babel-runtime/helpers/jsx.js
lux_assets-0.2.1 ./node_modules/babel-runtime/helpers/jsx.js
locomotivecms-3.4.0 app/javascript/node_modules/babel-runtime/helpers/jsx.js
cortex-0.1.3 spec/dummy/node_modules/babel-runtime/helpers/jsx.js
dragonfly_puppeteer-0.1.0 node_modules/babel-runtime/helpers/jsx.js
affiliator-0.2.1 node_modules/babel-runtime/helpers/jsx.js
lanes-0.8.0 node_modules/babel-runtime/helpers/jsx.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-plugin-transform-es2015-parameters/node_modules/babel-runtime/helpers/jsx.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-plugin-transform-es2015-object-super/node_modules/babel-runtime/helpers/jsx.js