Line 1: |
Line 1: |
| // License: GPL | | // License: GPL |
− | // | + | // function wbContainer( universe, location ) { |
− | Console.log('Wbprocessor loading');
| |
− | | |
− | function wbContainer( universe, location ) { | |
| | | |
| this.main = interjson( get_Y_from_X( universe, location )); | | this.main = interjson( get_Y_from_X( universe, location )); |
Line 37: |
Line 34: |
| } catch (e) { | | } catch (e) { |
| // if not JSON, do silly things | | // if not JSON, do silly things |
− | console.log('not a json ¯\_(ツ)_/¯'); | + | consol.log('not a json ¯\_(ツ)_/¯'); |
| }; | | }; |
| } | | } |
Line 43: |
Line 40: |
| function get_Y_from_X( obj, B ){ | | function get_Y_from_X( obj, B ){ |
| if ( check(obj, B) !== undefined ) { | | if ( check(obj, B) !== undefined ) { |
− | console.log( "entity is defined" ) | + | consol.log( "entity is defined" ) |
| return dive(obj, B); | | return dive(obj, B); |
| } else { | | } else { |
| for (var i = 0; i < obj.length; i++ ){ | | for (var i = 0; i < obj.length; i++ ){ |
| if ( check(obj[i], B) !== undefined ) { | | if ( check(obj[i], B) !== undefined ) { |
− | console.log( "entity is defined within index " + i ); | + | consol.log( "entity is defined within index " + i ); |
| return dive(obj[i], B); | | return dive(obj[i], B); |
| }; | | }; |
| Object.keys(obj).forEach( function(item) { | | Object.keys(obj).forEach( function(item) { |
| if ( check(obj[item], B) !== undefined ) { | | if ( check(obj[item], B) !== undefined ) { |
− | console.log( "entity is defined within associative element" + item ) | + | consol.log( "entity is defined within associative element" + item ) |
| return dive(obj[item], B); | | return dive(obj[item], B); |
| }; | | }; |
Line 64: |
Line 61: |
| function check_Y_in_X(obj, to_check){ | | function check_Y_in_X(obj, to_check){ |
| if (obj === to_check) { | | if (obj === to_check) { |
− | console.log( "entity is confirmed"); | + | consol.log( "entity is confirmed"); |
| return true | | return true |
| }; | | }; |
| for (var i = 0; i < obj.length; i++ ){ | | for (var i = 0; i < obj.length; i++ ){ |
| if (obj[i] === to_check) { | | if (obj[i] === to_check) { |
− | console.log( "entity is confirmed within index " + i ); | + | consol.log( "entity is confirmed within index " + i ); |
| return true | | return true |
| }; | | }; |
Line 75: |
Line 72: |
| Object.keys(obj).forEach( function(item) { | | Object.keys(obj).forEach( function(item) { |
| if (obj[item] === to_check) { | | if (obj[item] === to_check) { |
− | console.log( "entity is confirmed within associative element" + item ) | + | consol.log( "entity is confirmed within associative element" + item ) |
| return true | | return true |
| }; | | }; |