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

tree-crawl

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-crawl - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/tree-crawl.min.js

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

!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.a=i()}(this,function(){"use strict";function t(t,i){this.b=t,this.c=i}function i(i,n){return new t(i,n)}function n(t){this.d=[t],this.e=0}function e(t){return new n(t)}function h(){this.depth=0,this.j=e({k:null,index:-1})}function r(){return new h}function s(){this.break=!1,this.skip=!1,this.remove=!1,this.replace=null}function o(){return new s}function u(t){return 0!==t.length}function c(t,n,h){for(var s=o(),c=r(),f=i(s,c),p=e(t),a=Object.assign({},t);!p.i();){var d=p.g();if(d!==a){if(s.o(),n(d,f),s.break)break;if(!s.remove&&(c.n(),!s.skip)){s.replace&&(d=s.replace);var l=h(d);u(l)&&(p.push(a),p.f(l),c.l(d))}}else c.m()}}function f(t,n,h){for(var s=o(),c=r(),f=i(s,c),p=e(t),a=e(null);!p.i();){var d=p.h(),l=a.h(),b=h(d);if(s.o(),d!==l&&u(b))a.push(d),c.l(d),p.f(b);else{if(d===l&&(a.g(),c.m()),p.g(),n(d,f),s.break)break;if(s.remove)continue;c.n()}}}function p(t){this.d=[t],this.e=0,this.p=0}function a(t){return new p(t)}function d(){this.depth=0,this.index=-1,this.t=a({k:null,u:1}),this.v=1,this.w=0}function l(){return new d}function b(t,n,e){for(var h=o(),r=l(),s=i(h,r),c=a(t);!c.i();){var f=c.s();if(h.o(),n(f,s),h.break)break;if(!h.remove&&(r.n(),h.replace&&(f=h.replace),!h.skip)){var p=e(f);u(p)&&(c.r(p),r.x(f,p.length))}r.y()}}function v(t,i,n){if(null!=t){var e=n.order||"pre",h=n.getChildren||j;"pre"===e?c(t,i,h):"post"===e?f(t,i,h):"bfs"===e&&b(t,i,h)}}t.prototype={skip:function(){this.b.skip=!0},break:function(){this.b.break=!0},remove:function(){this.b.remove=!0},replace:function(t){this.b.replace=t},get parent(){return this.c.parent},get depth(){return this.c.depth},get level(){return this.c.depth+1},get index(){return this.c.index}},n.prototype={push:function(t){this.e++,this.e<this.d.length?this.d[this.e]=t:this.d.push(t)},f:function(t){for(var i=t.length-1;i>=0;i--)this.push(t[i])},g:function(){var t=this.h();return this.e--,t},h:function(){return this.d[this.e]},i:function(){return-1===this.e}},h.prototype={l:function(t){this.depth++,this.j.push({k:t,index:0})},m:function(){this.depth--,this.j.g()},n:function(){this.j.h().index++},get parent(){return this.j.h().k},get index(){return this.j.h().index}},s.prototype={o:function(){this.break=!1,this.skip=!1,this.remove=!1,this.replace=null}};p.prototype={q:function(t){this.d.push(t)},r:function(t){for(var i=0,n=t.length;i<n;i++)this.q(t[i])},s:function(){var t=this.h();return this.e++,32768===this.e&&(this.d=this.d.slice(this.e),this.e=0),t},h:function(){return this.d[this.e]},i:function(){return this.e===this.d.length}},d.prototype={x:function(t,i){this.t.q({k:t,u:i}),this.w+=i},n:function(){this.index++},y:function(){this.t.h().u--,this.v--,0===this.t.h().u&&(this.index=0,this.t.s()),0===this.v&&(this.depth++,this.v=this.w,this.w=0)},get parent(){return this.t.h().k}};var j=function(t){return t.z};return v});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.t=t():"function"==typeof define&&define.i?define(t):e.s=t()}(this,function(){"use strict";function e(e,t){this.flags=e,this.cursor=t}function t(t,n){return new e(t,n)}function n(e){this.o=[e],this.top=0}function i(e){return new n(e)}function s(){this.u=0,this.stack=i({h:null,index:-1})}function o(){return new s}function r(){this.p=!1,this.l=!1,this.remove=!1,this.replace=null}function u(){return new r}function h(e){return 0!==e.length}function p(e,n,s){for(var r=u(),p=o(),c=t(r,p),f=i(e),a=Object.assign({},e);!f.v();){var l=f.pop();if(l!==a){if(r.reset(),n(l,c),r.p)break;if(!r.remove&&(p.moveNext(),!r.l)){r.replace&&(l=r.replace);var d=s(l);h(d)&&(f.push(a),f.k(d),p.m(l))}}else p.g()}}function c(e,n,s){for(var r=u(),p=o(),c=t(r,p),f=i(e),a=i(null);!f.v();){var l=f.j(),d=a.j(),v=s(l);if(r.reset(),l!==d&&h(v))a.push(l),p.m(l),f.k(v);else{if(l===d&&(a.pop(),p.g()),f.pop(),n(l,c),r.p)break;if(r.remove)continue;p.moveNext()}}}function f(e){this.o=[e],this.top=0,this.maxLength=0}function a(e){return new f(e)}function l(){this.u=0,this.index=-1,this.q=a({h:null,N:1}),this.O=1,this.L=0}function d(){return new l}function v(e,n,i){for(var s=u(),o=d(),r=t(s,o),p=a(e);!p.v();){var c=p.A();if(s.reset(),n(c,r),s.p)break;if(!s.remove&&(o.moveNext(),s.replace&&(c=s.replace),!s.l)){var f=i(c);h(f)&&(p.D(f),o.R(c,f.length))}o.U()}}e.prototype={l:function(){this.flags.l=!0},p:function(){this.flags.p=!0},remove:function(){this.flags.remove=!0},replace:function(e){this.flags.replace=e},get parent(){return this.cursor.parent},get u(){return this.cursor.u},get level(){return this.cursor.u+1},get index(){return this.cursor.index}},n.prototype={push:function(e){++this.top<this.o.length?this.o[this.top]=e:this.o.push(e)},k:function(e){for(var t=e.length-1;t>=0;t--)this.push(e[t])},pop:function(){var e=this.j();return this.top--,e},j:function(){return this.o[this.top]},v:function(){return-1===this.top}},s.prototype={m:function(e){this.u++,this.stack.push({h:e,index:0})},g:function(){this.u--,this.stack.pop()},moveNext:function(){this.stack.j().index++},get parent(){return this.stack.j().h},get index(){return this.stack.j().index}},r.prototype={reset:function(){this.p=!1,this.l=!1,this.remove=!1,this.replace=null}};f.prototype={F:function(e){this.o.push(e)},D:function(e){for(var t=0,n=e.length;t<n;t++)this.F(e[t])},A:function(){var e=this.j();return 32768===++this.top&&(this.o=this.o.slice(this.top),this.top=0),e},j:function(){return this.o[this.top]},v:function(){return this.top===this.o.length}},l.prototype={R:function(e,t){this.q.F({h:e,N:t}),this.L+=t},moveNext:function(){this.index++},U:function(){this.q.j().N--,this.O--,0===this.q.j().N&&(this.index=0,this.q.A()),0===this.O&&(this.u++,this.O=this.L,this.L=0)},get parent(){return this.q.j().h}};var k=function(e){return e.children};return function(e,t,n){if(null!=e){var i=n.order||"pre",s=n.M||k;"pre"===i?p(e,t,s):"post"===i?c(e,t,s):"bfs"===i&&v(e,t,s)}}});
{
"name": "tree-crawl",
"version": "1.0.0",
"version": "1.0.1",
"description": "Agnostic tree traversal library.",

@@ -8,4 +8,4 @@ "author": "Nicolas Gryman <ngryman@gmail.com> (http://ngryman.sh/)",

"repository": "ngryman/tree-crawl",
"main": "dist/tree-crawl.node.js",
"browser": "dist/tree-crawl.browser.js",
"main": "dist/tree-crawl.js",
"browser": "dist/tree-crawl.js",
"module": "index.js",

@@ -65,3 +65,3 @@ "jsnext:main": "index.js",

"devDependencies": {
"ava": "^0.18.2",
"ava": "^0.19.1",
"babel-plugin-external-helpers": "^6.22.0",

@@ -73,3 +73,3 @@ "babel-plugin-istanbul": "^4.1.1",

"codecov": "^2.1.0",
"cross-env": "^3.2.4",
"cross-env": "^5.0.0",
"documentation": "^4.0.0-beta.19",

@@ -83,5 +83,5 @@ "eslint": "^3.18.0",

"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^2.0.0",
"uglify-js": "^2.8.18"
"rollup-plugin-node-resolve": "^3.0.0",
"uglify-js": "^3.0.0"
}
}

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

# tree-crawl [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url]
# tree-crawl [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url] [![size][size-image]][size-url]

@@ -6,8 +6,7 @@ > Agnostic tree traversal library.

[travis-image]: https://img.shields.io/travis/ngryman/tree-crawl.svg?style=flat
[travis-url]: https://travis-ci.org/ngryman/tree-crawl
[codecov-image]: https://img.shields.io/codecov/c/github/ngryman/tree-crawl.svg
[codecov-url]: https://codecov.io/github/ngryman/tree-crawl
[size-image]: http://img.badgesize.io/https://unpkg.com/tree-crawl@1.0.0/dist/tree-crawl.min.js?compression=gzip
[size-url]: https://unpkg.com/tree-crawl@1.0.0/dist/tree-crawl.min.js

@@ -14,0 +13,0 @@ - **Agnostic**: Supports any kind of tree. You provide a way to access a node's children, that's it.

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