DuyTa's picture
Upload folder using huggingface_hub
bc20498 verified
raw
history blame
470 Bytes
let elesfn = ({
isNode: function(){
return this.group() === 'nodes';
},
isEdge: function(){
return this.group() === 'edges';
},
isLoop: function(){
return this.isEdge() && this.source()[0] === this.target()[0];
},
isSimple: function(){
return this.isEdge() && this.source()[0] !== this.target()[0];
},
group: function(){
let ele = this[0];
if( ele ){
return ele._private.group;
}
}
});
export default elesfn;