Comparing version 0.1.0 to 0.1.1
@@ -174,2 +174,3 @@ 'use strict'; | ||
init.executor(controller); | ||
init.executor = function () {}; // release reference | ||
return _this; | ||
@@ -208,2 +209,2 @@ } | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9UYWdUcmVlLmpzIl0sIm5hbWVzIjpbIkVNUFRZX0FSUkFZIiwiVGFnVHJlZSIsImluaXQiLCJyb290Tm9kZUNvbnRyb2xsZXIiLCJ2YWx1ZSIsInJvb3QiLCJwYXJlbnQiLCJvd25lZFRhZ3MiLCJ0YWdzIiwibWFwIiwidGFnIiwiZXhlY3V0b3IiLCJjb250cm9sbGVyIiwiX25vZGVDb250cm9sbGVycyIsIl9sb29rdXBUYWJsZSIsIkVycm9yIiwic2V0IiwiX2FsbEJ5VGFnIiwibGl2ZVNldCIsInJlYWQiLCJsaXN0ZW4iLCJfY29udHJvbGxlciIsInN1YnNjcmliZSIsImZvckVhY2giLCJvd25lZEJ5IiwiZW50cnkiLCJnZXQiLCJvd25pbmdUYWciLCJhZGQiLCJhZGRUYWdnZWRWYWx1ZSIsInRhZ0VudHJ5Iiwibm9kZSIsInZhbHVlTm9kZXMiLCJwdXNoIiwicGFyZW50Q29udHJvbGxlciIsImFkZE93bmVkTm9kZSIsInJlbW92ZVRhZ2dlZE5vZGUiLCJnZXRPd25lZCIsInZhbHVlcyIsImNoaWxkTm9kZSIsInJlbW92ZSIsImdldFZhbHVlIiwibm9kZXMiLCJsZW5ndGgiLCJpeCIsImluZGV4T2YiLCJzcGxpY2UiLCJkZWxldGUiLCJyZW1vdmVPd25lZE5vZGUiLCJlbmQiLCJsIiwic2xpY2UiLCJtIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVBOzs7O0FBR0E7Ozs7OztBQWVBLElBQU1BLGNBQWMsc0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yO1xuICAgICAgICBjb25zdCBub2RlID0gbmV3IFRhZ1RyZWVOb2RlKHtcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICBwYXJlbnQsXG4gICAgICAgICAgb3duZWRUYWdzOiB0YWdFbnRyeS5vd25lZFRhZ3MsXG4gICAgICAgICAgZXhlY3V0b3I6IChfY29udHJvbGxlcikgPT4ge1xuICAgICAgICAgICAgY29udHJvbGxlciA9IF9jb250cm9sbGVyO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmICghY29udHJvbGxlcikgdGhyb3cgbmV3IEVycm9yKCk7XG4gICAgICAgIHRoaXMuX25vZGVDb250cm9sbGVycy5zZXQobm9kZSwgY29udHJvbGxlcik7XG5cbiAgICAgICAgdGFnRW50cnkuY29udHJvbGxlci5hZGQobm9kZSk7XG5cbiAgICAgICAgY29uc3QgdmFsdWVOb2RlcyA9IHRoaXMuX2xvb2t1cFRhYmxlLmdldCh2YWx1ZSk7XG4gICAgICAgIGlmICh2YWx1ZU5vZGVzKSB7XG4gICAgICAgICAgdmFsdWVOb2Rlcy5wdXNoKG5vZGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuX2xvb2t1cFRhYmxlLnNldCh2YWx1ZSwgW25vZGVdKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBhcmVudENvbnRyb2xsZXIgPSB0aGlzLl9ub2RlQ29udHJvbGxlcnMuZ2V0KHBhcmVudCk7XG4gICAgICAgIGlmICghcGFyZW50Q29udHJvbGxlcikgdGhyb3cgbmV3IEVycm9yKCdwYXJlbnQgaXMgbm90IHBhcnQgb2YgVGFnVHJlZScpO1xuICAgICAgICBwYXJlbnRDb250cm9sbGVyLmFkZE93bmVkTm9kZSh0YWcsIG5vZGUpO1xuXG4gICAgICAgIHJldHVybiBub2RlO1xuICAgICAgfSxcbiAgICAgIHJlbW92ZVRhZ2dlZE5vZGU6IChwYXJlbnQsIHRhZywgbm9kZ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nVHJlZTogJHt0YWd9YCk7XG4gICAgcmV0dXJuIGVudHJ5LmxpdmVTZXQ7XG4gIH1cblxuICBnZXRBbGwoKTogTWFwPHN0cmluZywgTGl2ZVNldDxUYWdUcmVlTm9kZTxUPj4+IHtcbiAgICBjb25zdCBtID0gbmV3IE1hcCgpO1xuICAgIHRoaXMuX2FsbEJ5VGFnLmZvckVhY2goKHtsaXZlU2V0fSwgdGFnKSA9PiB7XG4gICAgICBtLnNldCh0YWcsIGxpdmVTZXQpO1xuICAgIH0pO1xuICAgIHJldHVybiBtO1xuICB9XG59XG4iXX0= |
@@ -34,2 +34,3 @@ 'use strict'; | ||
(0, _classCallCheck3.default)(this, TagTreeNode); | ||
this._ownedNodes = new _map2.default(); | ||
this._ownedByTag = new _map2.default(); | ||
@@ -40,2 +41,3 @@ | ||
addOwnedNode: function addOwnedNode(tag, node) { | ||
_this._ownedNodes.set(node, tag); | ||
var entry = _this._ownedByTag.get(tag); | ||
@@ -52,2 +54,3 @@ if (!entry) { | ||
removeOwnedNode: function removeOwnedNode(tag, node) { | ||
_this._ownedNodes.delete(node); | ||
var entry = _this._ownedByTag.get(tag); | ||
@@ -67,2 +70,3 @@ if (!entry) throw new Error('tag not owned'); | ||
}); | ||
this._init.executor = function () {}; // release reference | ||
} | ||
@@ -94,3 +98,3 @@ | ||
value: function getParent() { | ||
return this._init.parent; | ||
return this._init.parent || null; | ||
} | ||
@@ -121,2 +125,16 @@ }, { | ||
} | ||
}, { | ||
key: 'getTag', | ||
value: function getTag() { | ||
var parent = this._init.parent; | ||
return parent ? parent.getTagOfOwnedNode(this) : null; | ||
} | ||
}, { | ||
key: 'getTagOfOwnedNode', | ||
value: function getTagOfOwnedNode(node) { | ||
var tag = this._ownedNodes.get(node); | ||
if (tag == null) throw new Error('node not owned'); | ||
return tag; | ||
} | ||
}]); | ||
@@ -128,2 +146,2 @@ return TagTreeNode; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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gdGFnIG5vdCBvd25lZDogJHt0YWd9YCk7XG4gICAgICB9XG4gICAgICBlbnRyeSA9IHRoaXMuX2NyZWF0ZVRhZ0VudHJ5KCk7XG4gICAgICB0aGlzLl9vd25lZEJ5VGFnLnNldCh0YWcsIGVudHJ5KTtcbiAgICB9XG4gICAgcmV0dXJuIGVudHJ5LmxpdmVTZXQ7XG4gIH1cblxuICBnZXRPd25lZCgpOiBNYXA8c3RyaW5nLCBMaXZlU2V0PFRhZ1RyZWVOb2RlPFQ+Pj4ge1xuICAgIGNvbnN0IG0gPSBuZXcgTWFwKCk7XG4gICAgdGhpcy5fb3duZWRCeVRhZy5mb3JFYWNoKCh7bGl2ZVNldH0sIHRhZykgPT4ge1xuICAgICAgbS5zZXQodGFnLCBsaXZlU2V0KTtcbiAgICB9KTtcbiAgICByZXR1cm4gbTtcbiAgfVxuXG4gIGdldFRhZygpOiBudWxsfHN0cmluZyB7XG4gICAgY29uc3Qge3BhcmVudH0gPSB0aGlzLl9pbml0O1xuICAgIHJldHVybiBwYXJlbnQgPyBwYXJlbnQuZ2V0VGFnT2ZPd25lZE5vZGUodGhpcykgOiBudWxsO1xuICB9XG5cbiAgZ2V0VGFnT2ZPd25lZE5vZGUobm9kZTogVGFnVHJlZU5vZGU8VD4pOiBzdHJpbmcge1xuICAgIGNvbnN0IHRhZyA9IHRoaXMuX293bmVkTm9kZXMuZ2V0KG5vZGUpO1xuICAgIGlmICh0YWcgPT0gbnVsbCkgdGhyb3cgbmV3IEVycm9yKCdub2RlIG5vdCBvd25lZCcpO1xuICAgIHJldHVybiB0YWc7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "tag-tree", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42345
10
296