Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-tree-walker

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tree-walker - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

commonjs/index.js

@@ -163,3 +163,7 @@ 'use strict';

}
}).catch(function (err) {
// We don't want errors to be swallowed!
console.error('Error walking your react tree');
console.error(err);
});
}

2

package.json
{
"name": "react-tree-walker",
"version": "2.0.0",
"version": "2.0.1",
"description": "Walk a React element tree, executing a provided function against each node.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -252,2 +252,6 @@ (function webpackUniversalModuleDefinition(root, factory) {

}
}).catch(function (err) {
// We don't want errors to be swallowed!
console.error('Error walking your react tree');
console.error(err);
});

@@ -254,0 +258,0 @@ }

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactTreeWalker=t(require("react")):e.ReactTreeWalker=t(e.React)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e,t,n){return new Promise(function(i){var f=function(e,n,f,s){var l=function(n){n||i();var c=e(),l="function"==typeof f?f():f;if(null==c)i();else if(s){var a=function(e){return e?o(e,t,l):void 0};u(r.Children.map(c,function(e){return e}),a).then(i)}else o(c,t,l).then(i)};n===!1?i():c(n)?n.then(l).catch(function(e){console.log("Error occurred in Promise based visitor result provided to react-tree-walker."),e&&(console.log(e),e.stack&&console.log(e.stack))}):l(!0)};if("function"==typeof e.type){var s=e.type,l=Object.assign({},s.defaultProps,e.props),a=s.prototype&&(s.prototype.isReactComponent||s.prototype.isPureReactComponent);if(a){var p=new s(l,n);p.props=p.props||l,p.context=p.context||n,p.setState=function(e){p.state=Object.assign({},p.state,e)},f(function(){return p.componentWillMount&&p.componentWillMount(),p.render()},t(e,p,n),function(){return p.getChildContext?Object.assign({},n,p.getChildContext()):n})}else f(function(){return s(l,n)},t(e,null,n),n)}else f(function(){return e.props&&e.props.children?e.props.children:void 0},t(e,null,n),n,!0)})}Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0,t.default=o;var r=n(0),i=function(e,t,n){return new Promise(function(o,r){var i=e[Symbol.iterator](),u=0,c=function e(n){var c=i.next();return c.done?void o(n):void Promise.all([n,c.value]).then(function(n){e(t(n[0],n[1],u++))}).catch(r)};c(n)})},u=function(e,t){var n=[];return i(e,function(e,o,r){return Promise.resolve(t(o,r)).then(function(e){n.push(e)})}).then(function(){return n})},c=t.isPromise=function(e){return null!=e&&"function"==typeof e.then}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactTreeWalker=t(require("react")):e.ReactTreeWalker=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e,t,n){return new Promise(function(i){var s=function(e,n,s,f){var l=function(n){n||i();var c=e(),l="function"==typeof s?s():s;if(null==c)i();else if(f){var a=function(e){return e?r(e,t,l):void 0};u(o.Children.map(c,function(e){return e}),a).then(i)}else r(c,t,l).then(i)};n===!1?i():c(n)?n.then(l).catch(function(e){console.log("Error occurred in Promise based visitor result provided to react-tree-walker."),e&&(console.log(e),e.stack&&console.log(e.stack))}):l(!0)};if("function"==typeof e.type){var f=e.type,l=Object.assign({},f.defaultProps,e.props),a=f.prototype&&(f.prototype.isReactComponent||f.prototype.isPureReactComponent);if(a){var p=new f(l,n);p.props=p.props||l,p.context=p.context||n,p.setState=function(e){p.state=Object.assign({},p.state,e)},s(function(){return p.componentWillMount&&p.componentWillMount(),p.render()},t(e,p,n),function(){return p.getChildContext?Object.assign({},n,p.getChildContext()):n})}else s(function(){return f(l,n)},t(e,null,n),n)}else s(function(){return e.props&&e.props.children?e.props.children:void 0},t(e,null,n),n,!0)}).catch(function(e){console.error("Error walking your react tree"),console.error(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0,t.default=r;var o=n(0),i=function(e,t,n){return new Promise(function(r,o){var i=e[Symbol.iterator](),u=0,c=function e(n){var c=i.next();return c.done?void r(n):void Promise.all([n,c.value]).then(function(n){e(t(n[0],n[1],u++))}).catch(o)};c(n)})},u=function(e,t){var n=[];return i(e,function(e,r,o){return Promise.resolve(t(r,o)).then(function(e){n.push(e)})}).then(function(){return n})},c=t.isPromise=function(e){return null!=e&&"function"==typeof e.then}}])});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc