react-collection-helpers
Version:
React Collection Helpers Component
10 lines (8 loc) • 315 B
JavaScript
export var isCollectionHelper = function isCollectionHelper(element) {
var isNativeNode = typeof element.type === 'string';
var hasNoDisplayName = !element.type.displayName;
if (isNativeNode || hasNoDisplayName) {
return false;
}
return !!element.type.displayName.match(/^ReactCollectionHelper/);
};