add node filter for map

This commit is contained in:
Mark Nadal 2016-08-03 17:11:49 -07:00
parent 9d231755ce
commit 8cea0bc5f8
2 changed files with 6 additions and 1 deletions

5
gun.js
View File

@ -918,6 +918,11 @@
}
function each(val, field){
//if(!Gun.is.rel(val)){ path.call(this.gun, null, val, field);return;}
if(opt.node){
if(!Gun.is.rel(val)){
return;
}
}
cb.hash[this.soul + field] = cb.hash[this.soul + field] || this.gun.path(field, path, {chain: chain, via: 'map'}); // TODO: path should reuse itself! We shouldn't have to do it ourselves.
// TODO:
// 1. Ability to turn off an event. // automatically happens within path since reusing is manual?

View File

@ -1,6 +1,6 @@
{
"name": "gun",
"version": "0.3.99",
"version": "0.3.991",
"description": "Graph engine",
"main": "index.js",
"scripts": {