MCPcopy Index your code
hub / github.com/garris/BackstopJS / invariant

Function invariant

examples/simpleReactApp/compiled.js:274–274  ·  view source on GitHub ↗
(condition, format, a, b, c, d, e, f)

Source from the content-addressed store, hash-verified

272 141: [function (require, module, exports) { 'use strict'; var hyphenate = require('./hyphenate'); var msPattern = /^ms-/; function hyphenateStyleName (string) { return hyphenate(string).replace(msPattern, '-ms-'); }module.exports = hyphenateStyleName; }, { './hyphenate': 140 }],
273 142: [function (require, module, exports) { 'use strict'; var ReactCompositeComponent = require('./ReactCompositeComponent'); var ReactEmptyComponent = require('./ReactEmptyComponent'); var ReactNativeComponent = require('./ReactNativeComponent'); var assign = require('./Object.assign'); var invariant = require('./invariant'); var warning = require('./warning'); var ReactCompositeComponentWrapper = function () {}; assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, { _instantiateReactComponent: instantiateReactComponent }); function isInternalComponentType (type) { return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; } function instantiateReactComponent (node, parentCompositeType) { var instance; if (node === null || node === false) { node = ReactEmptyComponent.emptyElement; } if (typeof node === 'object') { var element = node; if ('production' !== 'production') { 'production' !== 'production' ? warning(element && (typeof element.type === 'function' || typeof element.type === 'string'), 'Only functions or strings can be mounted as React components.') : null; } if (parentCompositeType === element.type && typeof element.type === 'string') { instance = ReactNativeComponent.createInternalComponent(element); } else if (isInternalComponentType(element.type)) { instance = new element.type(element); } else { instance = new ReactCompositeComponentWrapper(); } } else if (typeof node === 'string' || typeof node === 'number') { instance = ReactNativeComponent.createInstanceForText(node); } else { 'production' !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false); } if ('production' !== 'production') { 'production' !== 'production' ? warning(typeof instance.construct === 'function' && typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : null; }instance.construct(node); instance._mountIndex = 0; instance._mountImage = null; if ('production' !== 'production') { instance._isOwnerNecessary = false; instance._warnedAboutRefsInRender = false; } if ('production' !== 'production') { if (Object.preventExtensions) { Object.preventExtensions(instance); } } return instance; }module.exports = instantiateReactComponent; }, { './Object.assign': 34, './ReactCompositeComponent': 45, './ReactEmptyComponent': 67, './ReactNativeComponent': 81, './invariant': 143, './warning': 162 }],
274 143: [function (require, module, exports) { 'use strict'; var invariant = function (condition, format, a, b, c, d, e, f) { if ('production' !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () { return args[argIndex++]; })); }error.framesToPop = 1; throw error; } }; module.exports = invariant; }, {}],
275 144: [function (require, module, exports) { 'use strict'; var ExecutionEnvironment = require('./ExecutionEnvironment'); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { useHasFeature = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature('', '') !== true; } function isEventSupported (eventNameSuffix, capture) { if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { return false; } var eventName = 'on' + eventNameSuffix; var isSupported = eventName in document; if (!isSupported) { var element = document.createElement('div'); element.setAttribute(eventName, 'return;'); isSupported = typeof element[eventName] === 'function'; } if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); } return isSupported; }module.exports = isEventSupported; }, { './ExecutionEnvironment': 28 }],
276 145: [function (require, module, exports) { function isNode (object) { return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); }module.exports = isNode; }, {}],
277 146: [function (require, module, exports) { 'use strict'; var supportedInputTypes = { color: true, date: true, datetime: true, 'datetime-local': true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true }; function isTextInputElement (elem) { return elem && (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type] || elem.nodeName === 'TEXTAREA'); }module.exports = isTextInputElement; }, {}],

Callers 15

compiled.jsFile · 0.85
validateInstanceHandleFunction · 0.85
recomputePluginOrderingFunction · 0.85
publishEventForPluginFunction · 0.85
publishRegistrationNameFunction · 0.85
executeDirectDispatchFunction · 0.85
_assertSingleLinkFunction · 0.85
_assertValueLinkFunction · 0.85
_assertCheckedLinkFunction · 0.85
standardReleaserFunction · 0.85
validateMethodOverrideFunction · 0.85
mixSpecIntoComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected