encoder.js
function( db, prefix ) {
		if (!prefix) prefix="";
		// Import into an easy-to-process format
		var keys = Object.keys(db), k, v;
		for (var i=0; i<keys.length; ++i) {
			k = keys[i]; v = db[k];
			if (!db.hasOwnProperty(k)) continue;

			this.dbTags.push( prefix+k );
			this.dbObjects.push( db[k] );

			// Define the XRef property for faster lookup of the key
			Object.defineProperty(
				v, "__xref__", {
					enumerable: false,
					value: k,
				}
			);

		}
		// Keep reference of database
		this.database = db;
	}
function( db, prefix ) {
		if (!prefix) prefix="";
		// Import into an easy-to-process format
		var keys = Object.keys(db), k, v;
		for (var i=0; i<keys.length; ++i) {
			k = keys[i]; v = db[k];
			if (!db.hasOwnProperty(k)) continue;

			this.dbTags.push( prefix+k );
			this.dbObjects.push( db[k] );

			// Define the XRef property for faster lookup of the key
			Object.defineProperty(
				v, "__xref__", {
					enumerable: false,
					value: k,
				}
			);

		}
		// Keep reference of database
		this.database = db;
	}
function ( db , prefix ) { if ( ! prefix ) prefix = "" ; // Import into an easy-to-process format var keys = Object . keys ( db ) , k , v ; for ( var i = 0 ; i < keys . length ; ++ i ) { k = keys [ i ] ; v = db [ k ] ; if ( ! db . hasOwnProperty ( k ) ) continue ; this . dbTags . push ( prefix + k ) ; this . dbObjects . push ( db [ k ] ) ; // Define the XRef property for faster lookup of the key Object . defineProperty ( v , "__xref__" , { enumerable : false , value : k , } ) ; } // Keep reference of database this . database = db ; }
Define an external database of tagged objects to use
for cross-referencing external entities.
Define an external database of tagged objects to use for cross - referencing external entities .