lib/api/model.js
function titleField (modelName, field, callback) {

    // Make this a no-op unless the field being evaluated is `'title'`.
    if (field !== 'title') {
        return callback(null, field);
    }

    if (get(modelName, true).schema.paths[field]) {
        return callback(null, field);
    }

    model(modelName, (err, opts) => {

        if (err) {
            return callback(err);
        }

        return callback(null, opts.title);

    });

}
function titleField (modelName, field, callback) {

    // Make this a no-op unless the field being evaluated is `'title'`.
    if (field !== 'title') {
        return callback(null, field);
    }

    if (get(modelName, true).schema.paths[field]) {
        return callback(null, field);
    }

    model(modelName, (err, opts) => {

        if (err) {
            return callback(err);
        }

        return callback(null, opts.title);

    });

}
function titleField ( modelName , field , callback ) { // Make this a no-op unless the field being evaluated is `'title'`. if ( field !== 'title' ) { return callback ( null , field ) ; } if ( get ( modelName , true ) . schema . paths [ field ] ) { return callback ( null , field ) ; } model ( modelName , ( err , opts ) => { if ( err ) { return callback ( err ) ; } return callback ( null , opts . title ) ; } ) ; }
Retrieve the title field for a model
@param  {String}   modelName The name of the model.
@param  {String}   field     A field in the model.
@param  {Function} callback  A callback to provide the result to.
@return {Void}
Retrieve the title field for a model