From ae7a5df47be9ff6aa7a0ddb6f3334183c8cf1416 Mon Sep 17 00:00:00 2001 From: Sequoia McDowell Date: Fri, 6 May 2016 22:37:38 -0400 Subject: [PATCH] Document promise support for DAO::find It was previously completely undocumented. There are additional methods that add promises but I figure accurately documenting some is better than none. :) --- lib/dao.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dao.js b/lib/dao.js index a67957dd..b95db578 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -1568,7 +1568,8 @@ DataAccessObject._coerce = function(where) { * - `{foo: true}` - include only foo * - `{bat: false}` - include all properties, exclude bat * - * @param {Function} cb Required callback function. Call this function with two arguments: `err` (null or Error) and an array of instances. + * @param {Function} cb Optional callback function. Call this function with two arguments: `err` (null or Error) and an array of instances. + * @return {Promise} results If no callback function is provided, a promise (which resolves to an array of instances) is returned */ DataAccessObject.find = function find(query, options, cb) {