index.js
function resolveValueOrNodeSkel(index, val, valDefault) {
    switch (typeof(val)) {
      case "string":
        return resolveNodeSkel(index, val);
      case "undefined":
        if (valDefault === undefined) {
          throw "Unable to get value'" + val + "'";
        }
        return () => valDefault;
      default:
        return () => val;
    }
  }
function resolveValueOrNodeSkel(index, val, valDefault) {
    switch (typeof(val)) {
      case "string":
        return resolveNodeSkel(index, val);
      case "undefined":
        if (valDefault === undefined) {
          throw "Unable to get value'" + val + "'";
        }
        return () => valDefault;
      default:
        return () => val;
    }
  }
function resolveValueOrNodeSkel ( index , val , valDefault ) { switch ( typeof ( val ) ) { case "string" : return resolveNodeSkel ( index , val ) ; case "undefined" : if ( valDefault === undefined ) { throw "Unable to get value'" + val + "'" ; } return ( ) => valDefault ; default : return ( ) => val ; } }
Helper function for getting either a value or data from another node, or return the default
Helper function for getting either a value or data from another node or return the default