How to use the fbjs/lib/emptyFunction.thatReturns function in fbjs

To help you get started, we’ve selected a few fbjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rookLab / react-component-caching / SSRtest / developmentBuild.js View on Github external
};

function validateProperties$2(type, props, canUseEventSystem) {
  if (isCustomComponent(type, props)) {
    return;
  }
  warnUnknownProperties(type, props, canUseEventSystem);
}

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

// Based on reading the React.Children implementation. TODO: type this somewhere?

var toArray = React.Children.toArray;

var getStackAddendum = emptyFunction.thatReturns('');

{
  var validatePropertiesInDevelopment = function (type, props) {
    validateProperties(type, props);
    validateProperties$1(type, props);
    validateProperties$2(type, props, /* canUseEventSystem */false);
  };

  var describeStackFrame = function (element) {
    var source = element._source;
    var type = element.type;
    var name = getComponentName(type);
    var ownerName = null;
    return describeComponentFrame(name, source, ownerName);
  };
github rookLab / react-component-caching / SSRtest / productionBuild.js View on Github external
* @param {object} injectedNamesToPlugins Map from names to plugin modules.
 * @internal
 * @see {EventPluginHub.injection.injectEventPluginsByName}
 */

// When adding attributes to the HTML or SVG whitelist, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.

function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

// Based on reading the React.Children implementation. TODO: type this somewhere?

var toArray = React.Children.toArray;

var getStackAddendum = emptyFunction.thatReturns('');

var newlineEatingTags = {
  listing: true,
  pre: true,
  textarea: true
};

function getComponentName(type) {
  return typeof type === 'string' ? type : typeof type === 'function' ? type.displayName || type.name : null;
}

// We accept any tag to be rendered but since this gets injected into arbitrary
// HTML, we want to make sure that it's a safe tag.
// http://www.w3.org/TR/REC-xml/#NT-Name
var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
var validatedTagCache = {};
github rookLab / react-component-caching / src / index.js View on Github external
return;
      }
      warnUnknownProperties(type, props, canUseEventSystem);
    }

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    // Based on reading the React.Children implementation. TODO: type this somewhere?

    var toArray = React.Children.toArray;

    var getStackAddendum = emptyFunction.thatReturns("");

    {
      var validatePropertiesInDevelopment = function(type, props) {
        validateProperties(type, props);
        validateProperties$1(type, props);
        validateProperties$2(type, props, /* canUseEventSystem */ false);
      };

      var describeStackFrame = function(element) {
        var source = element._source;
        var type = element.type;
        var name = getComponentName(type);
        var ownerName = null;
        return describeComponentFrame(name, source, ownerName);
      };
github cytle / wechat_web_devtools / package.nw / node_modules / react-dom / cjs / react-dom-server.node.development.js View on Github external
return;
  }
  warnUnknownProperties(type, props, canUseEventSystem);
}

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

// Based on reading the React.Children implementation. TODO: type this somewhere?

var toArray = React.Children.toArray;

var currentDebugStack = void 0;
var currentDebugElementStack = void 0;

var getStackAddendum = emptyFunction.thatReturns('');
var describeStackFrame = emptyFunction.thatReturns('');

var validatePropertiesInDevelopment = function (type, props) {};
var setCurrentDebugStack = function (stack) {};
var pushElementToDebugStack = function (element) {};
var resetCurrentDebugStack = function () {};

{
  validatePropertiesInDevelopment = function (type, props) {
    validateProperties(type, props);
    validateProperties$1(type, props);
    validateProperties$2(type, props, /* canUseEventSystem */false);
  };

  describeStackFrame = function (element) {
    var source = element._source;
    var type = element.type;
github FormidableLabs / react-europe-workshop / exercises / suspense / react-dom / cjs / react-dom-server.node.development.js View on Github external
function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    // Based on reading the React.Children implementation. TODO: type this somewhere?

    var toArray = React.Children.toArray;

    var currentDebugStack = void 0;
    var currentDebugElementStack = void 0;

    var getStackAddendum = emptyFunction.thatReturns("");
    var describeStackFrame = emptyFunction.thatReturns("");

    var validatePropertiesInDevelopment = function(type, props) {};
    var setCurrentDebugStack = function(stack) {};
    var pushElementToDebugStack = function(element) {};
    var resetCurrentDebugStack = function() {};

    {
      validatePropertiesInDevelopment = function(type, props) {
        validateProperties(type, props);
        validateProperties$1(type, props);
        validateProperties$2(type, props, /* canUseEventSystem */ false);
      };

      describeStackFrame = function(element) {
        var source = element._source;
        var type = element.type;
github FormidableLabs / react-europe-workshop / exercises / suspense / react-dom / cjs / react-dom-server.node.development.js View on Github external
}

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    // Based on reading the React.Children implementation. TODO: type this somewhere?

    var toArray = React.Children.toArray;

    var currentDebugStack = void 0;
    var currentDebugElementStack = void 0;

    var getStackAddendum = emptyFunction.thatReturns("");
    var describeStackFrame = emptyFunction.thatReturns("");

    var validatePropertiesInDevelopment = function(type, props) {};
    var setCurrentDebugStack = function(stack) {};
    var pushElementToDebugStack = function(element) {};
    var resetCurrentDebugStack = function() {};

    {
      validatePropertiesInDevelopment = function(type, props) {
        validateProperties(type, props);
        validateProperties$1(type, props);
        validateProperties$2(type, props, /* canUseEventSystem */ false);
      };

      describeStackFrame = function(element) {
        var source = element._source;
github Dajust / reduxTrello / node_modules / react / lib / ReactPropTypes.js View on Github external
function createAnyTypeChecker() {
  return createChainableTypeChecker(emptyFunction.thatReturns(null));
}
github aemoe / webpack-react-framework / node_modules / react / lib / ReactPropTypes.js View on Github external
function createAnyTypeChecker() {
  return createChainableTypeChecker(emptyFunction.thatReturns(null));
}
github joshuaslate / saas-tutorial / node_modules / react / lib / ReactPropTypes.js View on Github external
function createAnyTypeChecker() {
  return createChainableTypeChecker(emptyFunction.thatReturns(null));
}