From 1f8fdabb5e35db2ba08a35f04bbfd43cf43c4219 Mon Sep 17 00:00:00 2001 From: Ryan Smith <0ryansmith1994@gmail.com> Date: Fri, 9 Aug 2013 19:49:20 +0100 Subject: [PATCH] New release '1.0.3'. --- build/release.min.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/release.min.js b/build/release.min.js index 27d2d5a..562b126 100644 --- a/build/release.min.js +++ b/build/release.min.js @@ -6,6 +6,6 @@ * Released under the MIT license. * https://github.com/ryansmith94/Graph/blob/master/license.md * - * Version 1.0.2. + * Version 1.0.3. */ -!function(a){"use strict";var b={parentsKey:"parents",childrenKey:"children"},c=function(a,b,c){return a.forEach(function(a){a[b]=a[b].concat(c)}),a},d=function(a,b,c,d){return function e(a,d){var f=[],g=d>0||void 0===d?e:function(){return[]};return a.forEach(function(a){f=a[b].filter(c),f=f.concat(g(a[b],d&&d-1))}),f}(a,d)},e=function(a,b,c){return a.forEach(function(a){c.forEach(function(c){a[b].splice(a[b].indexOf(c),1)})}),a},f=function(a){return"[object Array]"!==Object.prototype.toString.call(a)?[a]:a},g=function(){return!0},h=function(a,i){var j=this;return a=f(a),i=i||b,b=i,j.children=function(b,c){return new h(d(a,i.childrenKey,b||g,c),i)},j.parents=function(b,c){return new h(d(a,i.parentsKey,b||g,c),i)},j.addChildren=function(b){return c(a,i.childrenKey,c(f(b),i.parentsKey,a)),j},j.addParents=function(b){return c(a,i.parentsKey,c(f(b),i.childrenKey,a)),j},j.removeChildren=function(b){return e(a,i.childrenKey,e(f(b),i.parentsKey,a)),j},j.removeParents=function(b){return e(a,i.parentsKey,e(f(b),i.childrenKey,a)),j},j.filter=function(b){return new h(a.filter(b||g),i)},j.nodes=function(){return a},j},i=function(a,b){return new h(a,b)};"Function"==typeof a.define?a.define("graph",[],function(){return i}):a.graph=i}(this); \ No newline at end of file +!function(a){"use strict";var b={parentsKey:"parents",childrenKey:"children"},c=function(a,b,c){return a.forEach(function(a){a[b]=a[b].concat(c)}),a},d=function(a,b,c,d){return function e(a,d){var f=[],g=d>0||void 0===d?e:function(){return[]};return a.forEach(function(a){f=a[b].filter(c),f=f.concat(g(a[b],d&&d-1))}),f}(a,d)},e=function(a,b,c){return a.forEach(function(a){c.forEach(function(c){a[b].splice(a[b].indexOf(c),1)})}),a},f=function(a){return"[object Array]"!==Object.prototype.toString.call(a)?[a]:a},g=function(){return!0},h=function(a,i){var j=this;return a=f(a),i=i||b,b=i,j.children=function(b,c){return new h(d(a,i.childrenKey,b||g,c),i)},j.parents=function(b,c){return new h(d(a,i.parentsKey,b||g,c),i)},j.addChildren=function(b){return c(a,i.childrenKey,c(f(b),i.parentsKey,a)),j},j.addParents=function(b){return c(a,i.parentsKey,c(f(b),i.childrenKey,a)),j},j.removeChildren=function(b){return e(a,i.childrenKey,e(f(b),i.parentsKey,a)),j},j.removeParents=function(b){return e(a,i.parentsKey,e(f(b),i.childrenKey,a)),j},j.filter=function(b){return new h(a.filter(b||g),i)},j.nodes=function(){return a},j},i=function(a,b){return new h(a,b)};"function"==typeof a.define?a.define("graph",[],function(){return i}):a.graph=i}(this); \ No newline at end of file diff --git a/package.json b/package.json index 4c36e30..1d7af12 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "bugs": { "url": "http://github.com/ryansmith94/Graph/issues" }, - "version": "1.0.2", + "version": "1.0.3", "licence": { "type": "MIT", "url": "https://github.com/ryansmith94/Graph/blob/master/license.md"