Socket
Socket
Sign inDemoInstall

node-relation

Package Overview
Dependencies
0
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

webpack.config.js

421

dist/NodeRelation.js

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

var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./AdvancedArray"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AdvancedArray_1 = __importDefault(require("./AdvancedArray"));
var Relation = /** @class */ (function () {
function Relation() {
var e_1, _a;
var tuples = [];
for (var _i = 0; _i < arguments.length; _i++) {
tuples[_i] = arguments[_i];
}
this.relations = new AdvancedArray_1.default;
try {
for (var tuples_1 = __values(tuples), tuples_1_1 = tuples_1.next(); !tuples_1_1.done; tuples_1_1 = tuples_1.next()) {
var tuple = tuples_1_1.value;
var _b = __read(tuple, 2), a = _b[0], b = _b[1];
if (this.hasTuple(a, b)) {
continue;
}
this.relations.push(tuple);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (tuples_1_1 && !tuples_1_1.done && (_a = tuples_1.return)) _a.call(tuples_1);
}
finally { if (e_1) throw e_1.error; }
}
}
Object.defineProperty(Relation.prototype, "nodes", {
/** 릴레이션이 가지고 있는 모든 노드 목록을 배열로 반환합니다. */
get: function () {
var e_2, _a;
var nodes = new AdvancedArray_1.default;
try {
for (var _b = __values(this.tuples), _c = _b.next(); !_c.done; _c = _b.next()) {
var tuple = _c.value;
nodes.ensure(tuple[0]);
nodes.ensure(tuple[1]);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
return __spread(nodes);
},
enumerable: false,
configurable: true
});
Object.defineProperty(Relation.prototype, "tuples", {
/** 릴레이션이 가지고 있는 1:1 관계를 튜플로 변환하여 목록을 배열로 반환합니다. */
get: function () {
return __spread(this.relations);
},
enumerable: false,
configurable: true
});
/**
* 튜플이 대상 노드를 가지고 있는지 여부를 반환합니다.
* @param tuple 검색할 튜플입니다.
* @param node 대상 노드입니다.
*/
Relation.prototype.isTupleHasNode = function (tuple, node) {
return tuple.indexOf(node) !== -1;
};
/**
* 튜플에서 대상 노드와 쌍을 맺는 다른 노드를 반환합니다. 없다면 null을 반환합니다.
* @param tuple 검색할 튜플입니다.
* @param node 대상 노드입니다.
*/
Relation.prototype.getMateNode = function (tuple, node) {
if (tuple[0] === node)
return tuple[1];
if (tuple[1] === node)
return tuple[0];
return null;
};
/**
* 매개변수로 받은 두 개의 노드를 새로운 튜플로 만들어 반환합니다.
* @param a 대상 노드입니다.
* @param b 대상 노드입니다.
*/
Relation.prototype.createTuple = function (a, b) {
return [a, b].sort();
};
/**
* 매개변수로 받은 노드를 알고 있는 모든 릴레이션을 지정합니다.
* @param target 대상 노드입니다.
* @param relation 저장될 릴레이션입니다.
*/
Relation.prototype.recursiveToSetTuple = function (target, relation) {
var e_3, _a;
var nodes = this.getRelativeNodes(target);
try {
for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {
var node = nodes_1_1.value;
if (relation.hasTuple(target, node)) {
continue;
}
relation.relations.push(this.createTuple(target, node));
this.recursiveToSetTuple(node, relation);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);
}
finally { if (e_3) throw e_3.error; }
}
};
/**
* 릴레이션이 대상 노드를 가지고 있는지 여부를 반환합니다.
* @param node 대상 노드입니다.
*/
Relation.prototype.hasNode = function (node) {
var e_4, _a;
try {
for (var _b = __values(this.relations), _c = _b.next(); !_c.done; _c = _b.next()) {
var tuple = _c.value;
if (this.isTupleHasNode(tuple, node))
return true;
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_4) throw e_4.error; }
}
return false;
};
/**
* 매개변수로 받은 두 개의 노드로 이루어진 튜플이 존재하는지 여부를 반환합니다.
* @param a 대상 노드입니다.
* @param b 대상 노드입니다.
*/
Relation.prototype.hasTuple = function (a, b) {
var e_5, _a;
try {
for (var _b = __values(this.relations), _c = _b.next(); !_c.done; _c = _b.next()) {
var tuple = _c.value;
if (this.getMateNode(tuple, a) === b) {
return true;
}
}
}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_5) throw e_5.error; }
}
return false;
};
/**
* 대상 노드와 관계를 형성하고 있는 모든 노드 목록을 배열로 반환합니다. 여러 노드를 매개변수로 전달하면, 합집합이 됩니다.
* 배열에 대상 노드는 포함되지 않으니 주의하십시오.
* @param nodes 대상 노드입니다.
*/
Relation.prototype.getRelativeNodes = function () {
var e_6, _a, e_7, _b;
var nodes = [];
for (var _i = 0; _i < arguments.length; _i++) {
nodes[_i] = arguments[_i];
}
var relatives = new AdvancedArray_1.default;
try {
for (var nodes_2 = __values(nodes), nodes_2_1 = nodes_2.next(); !nodes_2_1.done; nodes_2_1 = nodes_2.next()) {
var node = nodes_2_1.value;
try {
for (var _c = (e_7 = void 0, __values(this.getRelation(node).nodes)), _d = _c.next(); !_d.done; _d = _c.next()) {
var t = _d.value;
relatives.ensure(t);
}
}
catch (e_7_1) { e_7 = { error: e_7_1 }; }
finally {
try {
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
}
finally { if (e_7) throw e_7.error; }
}
relatives.delete(node);
}
}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {
try {
if (nodes_2_1 && !nodes_2_1.done && (_a = nodes_2.return)) _a.call(nodes_2);
}
finally { if (e_6) throw e_6.error; }
}
return __spread(relatives);
};
/**
* 노드 간 새로운 관계를 형성합니다. 중심 노드를 기준으로 대상 노드와 관계를 형성합니다.
* 형성된 결과를 새로운 릴레이션으로 만들어 반환합니다.
* 가령 `setRelation('language', 'korean', 'english', 'japanese')` 메서드는 `['langauge', 'korean'], ['language', 'english'], ['language', 'japanese']` 튜플을 생성합니다.
* 따라서 language 노드를 삭제할 경우 korean, english, japanese 노드들 사이의 관계성은 사라집니다.
* @param target 중심 노드입니다.
* @param nodes 대상 노드입니다.
*/
Relation.prototype.setRelation = function (target) {
var e_8, _a;
var nodes = [];
for (var _i = 1; _i < arguments.length; _i++) {
nodes[_i - 1] = arguments[_i];
}
var relation = new (Relation.bind.apply(Relation, __spread([void 0], this.relations)))();
try {
for (var nodes_3 = __values(nodes), nodes_3_1 = nodes_3.next(); !nodes_3_1.done; nodes_3_1 = nodes_3.next()) {
var node = nodes_3_1.value;
if (relation.hasTuple(target, node)) {
continue;
}
var tuple = relation.createTuple(target, node);
relation.relations.push(tuple);
}
}
catch (e_8_1) { e_8 = { error: e_8_1 }; }
finally {
try {
if (nodes_3_1 && !nodes_3_1.done && (_a = nodes_3.return)) _a.call(nodes_3);
}
finally { if (e_8) throw e_8.error; }
}
return relation;
};
/**
* 대상 노드와 관계를 맺고 있는 노드만 추려내어 새로운 릴레이션으로 만들어 반환합니다.
* 여러 노드를 매개변수로 전달하면, 합집합이 됩니다.
* @param nodes 대상 노드입니다.
*/
Relation.prototype.getRelation = function () {
var e_9, _a, e_10, _b;
var nodes = [];
for (var _i = 0; _i < arguments.length; _i++) {
nodes[_i] = arguments[_i];
}
var tuples = [];
try {
for (var _c = __values(this.relations), _d = _c.next(); !_d.done; _d = _c.next()) {
var tuple = _d.value;
try {
for (var nodes_4 = (e_10 = void 0, __values(nodes)), nodes_4_1 = nodes_4.next(); !nodes_4_1.done; nodes_4_1 = nodes_4.next()) {
var node = nodes_4_1.value;
if (this.isTupleHasNode(tuple, node))
tuples.push(tuple);
}
}
catch (e_10_1) { e_10 = { error: e_10_1 }; }
finally {
try {
if (nodes_4_1 && !nodes_4_1.done && (_b = nodes_4.return)) _b.call(nodes_4);
}
finally { if (e_10) throw e_10.error; }
}
}
}
catch (e_9_1) { e_9 = { error: e_9_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_9) throw e_9.error; }
}
return new (Relation.bind.apply(Relation, __spread([void 0], tuples)))();
};
/**
* 대상 노드를 알고 있는 모든 관계를 추려내어 새로운 릴레이션으로 만들어 반환합니다.
* 여러 노드를 매개변수로 전달하면, 합집합이 됩니다.
* '알고 있다'는 것은, 직접적으로 관계되어 있거나, 다른 노드의 중계로 연결되어 있는 경우를 의미합니다.
* 예를 들어 A--B--C, D--E 의 형태로 노드가 관계되어 있을 경우, A와 C는 B를 경유합니다. 이 경우, A와 C는 서로를 '알고 있다'고 표현합니다.
* 하지만 D는 A, B, C와 어떤 관련도 없으므로 알고 있지 못합니다.
* @param nodes 대상 노드입니다.
*/
Relation.prototype.getLegionRelation = function () {
var e_11, _a;
var nodes = [];
for (var _i = 0; _i < arguments.length; _i++) {
nodes[_i] = arguments[_i];
}
var relation = new Relation;
try {
for (var nodes_5 = __values(nodes), nodes_5_1 = nodes_5.next(); !nodes_5_1.done; nodes_5_1 = nodes_5.next()) {
var node = nodes_5_1.value;
this.recursiveToSetTuple(node, relation);
}
}
catch (e_11_1) { e_11 = { error: e_11_1 }; }
finally {
try {
if (nodes_5_1 && !nodes_5_1.done && (_a = nodes_5.return)) _a.call(nodes_5);
}
finally { if (e_11) throw e_11.error; }
}
return relation;
};
/**
* 노드 간 형성된 관계를 제거합니다. 중심 노드를 기준으로 대상 노드와 관계를 제거합니다.
* 형성된 결과를 새로운 릴레이션으로 만들어 반환합니다.
* @param target 중심 노드입니다.
* @param nodes 대상 노드입니다.
*/
Relation.prototype.deleteRelation = function (target) {
var e_12, _a;
var nodes = [];
for (var _i = 1; _i < arguments.length; _i++) {
nodes[_i - 1] = arguments[_i];
}
var relation = new (Relation.bind.apply(Relation, __spread([void 0], this.relations)))();
try {
for (var nodes_6 = __values(nodes), nodes_6_1 = nodes_6.next(); !nodes_6_1.done; nodes_6_1 = nodes_6.next()) {
var node = nodes_6_1.value;
var i = relation.relations.length;
while (i--) {
var tuple = relation.relations[i];
if (relation.getMateNode(tuple, target) === node) {
relation.relations.delete(tuple);
break;
}
}
}
}
catch (e_12_1) { e_12 = { error: e_12_1 }; }
finally {
try {
if (nodes_6_1 && !nodes_6_1.done && (_a = nodes_6.return)) _a.call(nodes_6);
}
finally { if (e_12) throw e_12.error; }
}
return relation;
};
/**
* 노드를 삭제합니다. 삭제된 노드와 형성되어 있던 관계는 제거됩니다.
* 형성된 결과를 새로운 릴레이션으로 만들어 반환합니다.
* @param nodes 대상 노드입니다.
*/
Relation.prototype.deleteNode = function () {
var e_13, _a;
var nodes = [];
for (var _i = 0; _i < arguments.length; _i++) {
nodes[_i] = arguments[_i];
}
var relation = new (Relation.bind.apply(Relation, __spread([void 0], this.relations)))();
try {
for (var nodes_7 = __values(nodes), nodes_7_1 = nodes_7.next(); !nodes_7_1.done; nodes_7_1 = nodes_7.next()) {
var node = nodes_7_1.value;
var i = relation.relations.length;
while (i--) {
var tuple = relation.relations[i];
if (relation.isTupleHasNode(tuple, node)) {
relation.relations.delete(tuple);
}
}
}
}
catch (e_13_1) { e_13 = { error: e_13_1 }; }
finally {
try {
if (nodes_7_1 && !nodes_7_1.done && (_a = nodes_7.return)) _a.call(nodes_7);
}
finally { if (e_13) throw e_13.error; }
}
return relation;
};
return Relation;
}());
exports.default = Relation;
});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.NodeRelation=r():e.NodeRelation=r()}(window,(function(){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=this&&this.__values||function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(o(arguments[r]));return e},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var l=a(t(1)),u=function(){function e(){for(var e,r,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];this.relations=new l.default;try{for(var a=n(t),u=a.next();!u.done;u=a.next()){var f=u.value,c=o(f,2),s=c[0],p=c[1];this.hasTuple(s,p)||this.relations.push(f)}}catch(r){e={error:r}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}}return Object.defineProperty(e.prototype,"nodes",{get:function(){var e,r,t=new l.default;try{for(var o=n(this.tuples),a=o.next();!a.done;a=o.next()){var u=a.value;t.ensure(u[0]),t.ensure(u[1])}}catch(r){e={error:r}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return i(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tuples",{get:function(){return i(this.relations)},enumerable:!1,configurable:!0}),e.prototype.isTupleHasNode=function(e,r){return-1!==e.indexOf(r)},e.prototype.getMateNode=function(e,r){return e[0]===r?e[1]:e[1]===r?e[0]:null},e.prototype.createTuple=function(e,r){return[e,r].sort()},e.prototype.recursiveToSetTuple=function(e,r){var t,o,i=this.getRelativeNodes(e);try{for(var a=n(i),l=a.next();!l.done;l=a.next()){var u=l.value;r.hasTuple(e,u)||(r.relations.push(this.createTuple(e,u)),this.recursiveToSetTuple(u,r))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},e.prototype.hasNode=function(e){var r,t;try{for(var o=n(this.relations),i=o.next();!i.done;i=o.next()){var a=i.value;if(this.isTupleHasNode(a,e))return!0}}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.hasTuple=function(e,r){var t,o;try{for(var i=n(this.relations),a=i.next();!a.done;a=i.next()){var l=a.value;if(this.getMateNode(l,e)===r)return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}return!1},e.prototype.getRelativeNodes=function(){for(var e,r,t,o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var f=new l.default;try{for(var c=n(a),s=c.next();!s.done;s=c.next()){var p=s.value;try{for(var y=(t=void 0,n(this.getRelation(p).nodes)),d=y.next();!d.done;d=y.next()){var h=d.value;f.ensure(h)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(o=y.return)&&o.call(y)}finally{if(t)throw t.error}}f.delete(p)}}catch(r){e={error:r}}finally{try{s&&!s.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}return i(f)},e.prototype.setRelation=function(r){for(var t,o,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var u=new(e.bind.apply(e,i([void 0],this.relations)));try{for(var f=n(a),c=f.next();!c.done;c=f.next()){var s=c.value;if(!u.hasTuple(r,s)){var p=u.createTuple(r,s);u.relations.push(p)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=f.return)&&o.call(f)}finally{if(t)throw t.error}}return u},e.prototype.getRelation=function(){for(var r,t,o,a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];var f=[];try{for(var c=n(this.relations),s=c.next();!s.done;s=c.next()){var p=s.value;try{for(var y=(o=void 0,n(l)),d=y.next();!d.done;d=y.next()){var h=d.value;this.isTupleHasNode(p,h)&&f.push(p)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(t=c.return)&&t.call(c)}finally{if(r)throw r.error}}return new(e.bind.apply(e,i([void 0],f)))},e.prototype.getLegionRelation=function(){for(var r,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=new e;try{for(var l=n(o),u=l.next();!u.done;u=l.next()){var f=u.value;this.recursiveToSetTuple(f,a)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return a},e.prototype.deleteRelation=function(r){for(var t,o,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var u=new(e.bind.apply(e,i([void 0],this.relations)));try{for(var f=n(a),c=f.next();!c.done;c=f.next())for(var s=c.value,p=u.relations.length;p--;){var y=u.relations[p];if(u.getMateNode(y,r)===s){u.relations.delete(y);break}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=f.return)&&o.call(f)}finally{if(t)throw t.error}}return u},e.prototype.deleteNode=function(){for(var r,t,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var l=new(e.bind.apply(e,i([void 0],this.relations)));try{for(var u=n(o),f=u.next();!f.done;f=u.next())for(var c=f.value,s=l.relations.length;s--;){var p=l.relations[s];l.isTupleHasNode(p,c)&&l.relations.delete(p)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(t=u.return)&&t.call(u)}finally{if(r)throw r.error}}return l},e}();r.default=u},function(e,r,t){"use strict";var n,o=this&&this.__extends||(n=function(e,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)},function(e,r){function t(){this.constructor=e}n(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}),i=this&&this.__read||function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(i(arguments[r]));return e};Object.defineProperty(r,"__esModule",{value:!0});var l=function(e){function r(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=e.call(this)||this;return n.push.apply(n,a(r)),n}return o(r,e),r.prototype.has=function(e){return-1!==this.indexOf(e)},r.prototype.get=function(e){return this[this.indexOf(e)]},r.prototype.delete=function(e){var r=this.indexOf(e);-1!==r&&this.splice(r,1)},r.prototype.clear=function(){this.splice(0,this.length)},r.prototype.ensure=function(e){this.has(e)||this.push(e)},r.prototype.deduplication=function(){var e=new Set(this);this.clear(),this.push.apply(this,a(e))},r}(Array);r.default=l}])}));
{
"name": "node-relation",
"version": "2.0.0",
"version": "2.0.1",
"description": "Manage strings that are related to each other.",

@@ -8,3 +8,3 @@ "main": "dist/NodeRelation.js",

"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc"
"build": "webpack"
},

@@ -14,5 +14,8 @@ "author": "izure <admin@izure.org>",

"devDependencies": {
"webpack": "4.44.1",
"webpack-cli": "3.3.12",
"@types/node": "12.12.2",
"typescript": "4.0.2"
"typescript": "4.0.2",
"ts-loader": "8.0.3"
}
}

@@ -5,3 +5,4 @@ # node-relation

The data in the instance is immutable. Do not modify the data in the instance that invokes the method (setRelation, getRelation, getLegionRelation, deleteNode, etc.). Instead, it returns the result with a new instance.
The data inside the instance is immutable.
The method does not modify the data inside, it returns the result of the calculation as a new instance.

@@ -8,0 +9,0 @@ Check the code.

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc