Make it possible to delete all vertex edges at once.

This commit is contained in:
Oleksii Trekhleb
2018-05-12 10:35:54 +03:00
parent 4a6bc1e733
commit ff8f9c49df
2 changed files with 39 additions and 0 deletions

View File

@@ -119,6 +119,15 @@ export default class GraphVertex {
return this.value;
}
/**
* @return {GraphVertex}
*/
deleteAllEdges() {
this.getEdges().forEach(edge => this.deleteEdge(edge));
return this;
}
/**
* @param {function} [callback]
* @returns {string}