How do I add a non-remote method a model in Loopback?
<p>How can I add a local method to a Model <em>instance</em>? In other words, a method on the model instance that will be executed by the server, and not exposed over the rest interface.</p>

<p>What I want to be able to do on the server is run:</p>

<pre><code>Person.findById(1, (err, person) =&gt; {
    let b = person.customFunction();
});
</code></pre>

<p>but I do not want <code>customFunction</code> exposed over the rest interface.</p>

<p>I know you can create a remote method on a model like this:</p>

<pre><code>module.exports = function(Person){

    Person.greet = function(msg, cb) {
      cb(null, 'Greetings... ' + msg);
    }

    Person.remoteMethod(
        'greet', 
        {
          accepts: {arg: 'msg', type: 'string'},
          returns: {arg: 'greeting', type: 'string'}
        }
    );
};
</code></pre>

<p>And I know if you leave off the call to <code>Person.remoteMethod()</code> you will have added a server-only method to Model class itself, but that isn't what I'm looking for.</p>