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

tag-tree

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tag-tree - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

12

js/TagTree.js

@@ -72,3 +72,2 @@ 'use strict';

_this._nodeControllers = new _map2.default();
_this._lookupTable = new _map2.default();

@@ -78,2 +77,4 @@ if (!rootNodeController) throw new Error();

_this._lookupTable = new _map2.default([[init.root, [_this]]]);
_this._allByTag = new _map2.default();

@@ -140,2 +141,5 @@ init.tags.forEach(function (_ref2) {

var parentController = _this._nodeControllers.get(parent);
if (!parentController) throw new Error('parent is not part of TagTree');
var value = node.getValue();

@@ -159,7 +163,3 @@ var nodes = _this._lookupTable.get(value);

tagEntry.controller.remove(node);
var parentController = _this._nodeControllers.get(parent);
if (!parentController) throw new Error('parent is not part of TagTree');
parentController.removeOwnedNode(tag, node);
_this._nodeControllers.delete(node);

@@ -208,2 +208,2 @@ },

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9UYWdUcmVlLmpzIl0sIm5hbWVzIjpbIkVNUFRZX0FSUkFZIiwiVGFnVHJlZSIsImluaXQiLCJyb290Tm9kZUNvbnRyb2xsZXIiLCJ2YWx1ZSIsInJvb3QiLCJwYXJlbnQiLCJvd25lZFRhZ3MiLCJ0YWdzIiwibWFwIiwidGFnIiwiZXhlY3V0b3IiLCJjb250cm9sbGVyIiwiX25vZGVDb250cm9sbGVycyIsIl9sb29rdXBUYWJsZSIsIkVycm9yIiwic2V0IiwiX2FsbEJ5VGFnIiwiZm9yRWFjaCIsImFjdGl2ZSIsImxpdmVTZXQiLCJoYXMiLCJvd25lZEJ5IiwiZW50cnkiLCJnZXQiLCJvd25pbmdUYWciLCJhZGQiLCJ0cmVlIiwiYWRkVGFnZ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sZW5ndGggPiAxKSB7XG4gICAgICAgICAgY29uc3QgaXggPSBub2Rlcy5pbmRleE9mKG5vZGUpO1xuICAgICAgICAgIGlmIChpeCA8IDApIHRocm93IG5ldyBFcnJvcignbm9kZSB3YXMgbWlzc2luZyBmcm9tIGxpc3QgaW4gbG9va3VwIHRhYmxlIGJlZm9yZSByZW1vdmFsJyk7XG4gICAgICAgICAgbm9kZXMuc3BsaWNlKGl4LCAxKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLl9sb29rdXBUYWJsZS5kZWxldGUodmFsdWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgbm9kZS5nZXRPd25lZCgpLmZvckVhY2goKGxpdmVTZXQsIHRhZykgPT4ge1xuICAgICAgICAgIGxpdmVTZXQudmFsdWVzKCkuZm9yRWFjaChjaGlsZE5vZGUgPT4ge1xuICAgICAgICAgICAgY29udHJvbGxlci5yZW1vdmVUYWdnZWROb2RlKG5vZGUsIHRhZywgY2hpbGROb2RlKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGFnRW50cnkuY29udHJvbGxlci5yZW1vdmUobm9kZSk7XG4gICAgICAgIHBhcmVudENvbnRyb2xsZXIucmVtb3ZlT3duZWROb2RlKHRhZywgbm9kZSk7XG4gICAgICAgIHRoaXMuX25vZGVDb250cm9sbGVycy5kZWxldGUobm9kZSk7XG4gICAgICB9LFxuICAgICAgZW5kOiAoKSA9PiB7XG4gICAgICAgIHRoaXMuX25vZGVDb250cm9sbGVycy5mb3JFYWNoKGNvbnRyb2xsZXIgPT4ge1xuICAgICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH07XG4gICAgaW5pdC5leGVjdXRvcihjb250cm9sbGVyKTtcbiAgICBpbml0LmV4ZWN1dG9yID0gKCkgPT4ge307IC8vIHJlbGVhc2UgcmVmZXJlbmNlXG4gIH1cblxuICBnZXROb2Rlc0ZvclZhbHVlKHZhbHVlOiBUKTogQXJyYXk8VGFnVHJlZU5vZGU8VD4+IHtcbiAgICBjb25zdCBsID0gdGhpcy5fbG9va3VwVGFibGUuZ2V0KHZhbHVlKTtcbiAgICByZXR1cm4gbCA/IE9iamVjdC5mcmVlemUobC5zbGljZSgpKSA6IChFTVBUWV9BUlJBWTphbnkpO1xuICB9XG5cbiAgZ2V0QWxsQnlUYWcodGFnOiBzdHJpbmcpOiBMaXZlU2V0PFRhZ1RyZWVOb2RlPFQ+PiB7XG4gICAgY29uc3QgZW50cnkgPSB0aGlzLl9hbGxCeVRhZy5nZXQodGFnKTtcbiAgICBpZiAoIWVudHJ5KSB0aHJvdyBuZXcgRXJyb3IoYHRhZyBkb2VzIG5vdCBleGlzdCBpbiBUYWdUcmVlOiAke3RhZ31gKTtcbiAgICByZXR1cm4gZW50cnkubGl2ZVNldDtcbiAgfVxuXG4gIGdldEFsbCgpOiBNYXA8c3RyaW5nLCBMaXZlU2V0PFRhZ1RyZWVOb2RlPFQ+Pj4ge1xuICAgIGNvbnN0IG0gPSBuZXcgTWFwKCk7XG4gICAgdGhpcy5fYWxsQnlUYWcuZm9yRWFjaCgoe2xpdmVTZXR9LCB0YWcpID0+IHtcbiAgICAgIG0uc2V0KHRhZywgbGl2ZVNldCk7XG4gICAgfSk7XG4gICAgcmV0dXJuIG07XG4gIH1cbn1cbiJdfQ==
{
"name": "tag-tree",
"version": "0.3.1",
"version": "0.3.2",
"description": "Class representing a changing tree of tagged items.",

@@ -5,0 +5,0 @@ "main": "js/index.js",

Sorry, the diff of this file is not supported yet

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