lib/storage.js
function(when, operation) {
    return function(values, callback) {
      var callbackName = when + operation;

      // Call type callback.
      if (callbackName in settings) {
        return settings[callbackName](settings, values, function() {
          // Invoke hook on all extensions.
          application.invoke(callbackName, name, values, callback);
        });
      }

      // Invoke hook on all extensions.
      application.invoke(callbackName, name, values, callback);
    };
  }
function(when, operation) {
    return function(values, callback) {
      var callbackName = when + operation;

      // Call type callback.
      if (callbackName in settings) {
        return settings[callbackName](settings, values, function() {
          // Invoke hook on all extensions.
          application.invoke(callbackName, name, values, callback);
        });
      }

      // Invoke hook on all extensions.
      application.invoke(callbackName, name, values, callback);
    };
  }
function ( when , operation ) { return function ( values , callback ) { var callbackName = when + operation ; // Call type callback. if ( callbackName in settings ) { return settings [ callbackName ] ( settings , values , function ( ) { // Invoke hook on all extensions. application . invoke ( callbackName , name , values , callback ) ; } ) ; } // Invoke hook on all extensions. application . invoke ( callbackName , name , values , callback ) ; } ; }
Generate callbacks for all Waterline lifecycle callbacks.
Generate callbacks for all Waterline lifecycle callbacks .