handlebars/helpers.js
function (reference, options) {
    reference = reference.trim()
    if (reference.lastIndexOf('#', 0) < 0) {
      console.warn('Remote references not supported yet. Reference must start with "#" (but was ' + reference + ')')
      return {}
    }
    var components = reference.split('#')
    // var url = components[0]
    var hash = components[1]
    var hashParts = hash.split('/')
    // TODO : Download remote json from url if url not empty
    var current = options.data.root
    hashParts.forEach(function (hashPart) {
      // Traverse schema from root along the path
      if (hashPart.trim().length > 0) {
        if (typeof current === 'undefined') {
          throw new Error("Reference '" + reference + "' cannot be resolved. '" + hashPart + "' is undefined.")
        }
        current = current[hashPart]
      }
    })
    return current
  }
function (reference, options) {
    reference = reference.trim()
    if (reference.lastIndexOf('#', 0) < 0) {
      console.warn('Remote references not supported yet. Reference must start with "#" (but was ' + reference + ')')
      return {}
    }
    var components = reference.split('#')
    // var url = components[0]
    var hash = components[1]
    var hashParts = hash.split('/')
    // TODO : Download remote json from url if url not empty
    var current = options.data.root
    hashParts.forEach(function (hashPart) {
      // Traverse schema from root along the path
      if (hashPart.trim().length > 0) {
        if (typeof current === 'undefined') {
          throw new Error("Reference '" + reference + "' cannot be resolved. '" + hashPart + "' is undefined.")
        }
        current = current[hashPart]
      }
    })
    return current
  }
function ( reference , options ) { reference = reference . trim ( ) if ( reference . lastIndexOf ( '#' , 0 ) < 0 ) { console . warn ( 'Remote references not supported yet. Reference must start with "#" (but was ' + reference + ')' ) return { } } var components = reference . split ( '#' ) // var url = components[0] var hash = components [ 1 ] var hashParts = hash . split ( '/' ) // TODO : Download remote json from url if url not empty var current = options . data . root hashParts . forEach ( function ( hashPart ) { // Traverse schema from root along the path if ( hashPart . trim ( ) . length > 0 ) { if ( typeof current === 'undefined' ) { throw new Error ( "Reference '" + reference + "' cannot be resolved. '" + hashPart + "' is undefined." ) } current = current [ hashPart ] } } ) return current }
Resolve a (local) json-schema-
@param reference
Resolve a ( local ) json - schema -