Skip to content

Commit ea07400

Browse files
committed
Prep for v2.1.2 release
1 parent 358085f commit ea07400

File tree

7 files changed

+12665
-1463
lines changed

7 files changed

+12665
-1463
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphlib",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"main": [
55
"dist/graphlib.core.js"
66
],

dist/graphlib.core.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,16 @@ Graph.prototype.neighbors = function(v) {
859859
}
860860
};
861861

862+
Graph.prototype.isLeaf = function (v) {
863+
var neighbors;
864+
if (this.isDirected()) {
865+
neighbors = this.successors(v);
866+
} else {
867+
neighbors = this.neighbors(v);
868+
}
869+
return neighbors.length === 0;
870+
};
871+
862872
Graph.prototype.filterNodes = function(filter) {
863873
var copy = new this.constructor({
864874
directed: this._isDirected,
@@ -1200,7 +1210,7 @@ if (!lodash) {
12001210
module.exports = lodash;
12011211

12021212
},{"lodash":undefined}],20:[function(require,module,exports){
1203-
module.exports = '2.1.1';
1213+
module.exports = '2.1.2';
12041214

12051215
},{}]},{},[1])(1)
12061216
});

dist/graphlib.core.min.js

Lines changed: 138 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)