graph-environment.js
/**
   Given a property identifier, return the definition from the environment's context.
   @param {(string|URL)} identifier - An identifier present in the context
   @return {PropertyDefinition}
   @todo The definition should be a standard JavaScript property descriptor
   @todo Change name to getPropertyDescriptor
   */
Given a property identifier, return the definition from the environment's context.
Given a property identifier return the definition from the environment ' s context .
fieldDefinition(identifier) {
    var def;
    switch (typeof(identifier)) {
    case 'string': 
      return (this.context[name] || null);
    case 'object': 
      var namestring = identifier.lexicalForm;
      def = this.context[namestring];
      if (def) {
        return (def);
      } else {
        var localPart = predicateLeaf(identifier);
        def = this.context[localPart];
        if (def) {
          this.context[namestring] = def;
          return (def);
        } else {
          return (this.context[namestring] = {});
        }
      }
    default:
      return (null);
    }
  }
fieldDefinition ( identifier ) { var def ; switch ( typeof ( identifier ) ) { case 'string' : return ( this . context [ name ] || null ) ; case 'object' : var namestring = identifier . lexicalForm ; def = this . context [ namestring ] ; if ( def ) { return ( def ) ; } else { var localPart = predicateLeaf ( identifier ) ; def = this . context [ localPart ] ; if ( def ) { this . context [ namestring ] = def ; return ( def ) ; } else { return ( this . context [ namestring ] = { } ) ; } } default : return ( null ) ; } }
Given a property identifier, return the definition from the environment's context.
Given a property identifier return the definition from the environment ' s context .
// console.log("fieldDefinition", identifier); // field name // url