From c80b3341302cfca22079eaf066935f27adfe52e9 Mon Sep 17 00:00:00 2001 From: crandmck Date: Fri, 14 Mar 2014 10:28:31 -0700 Subject: [PATCH] Improvements to JSDoc comments --- lib/models/email.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/models/email.js b/lib/models/email.js index cc351c92..3950db6e 100644 --- a/lib/models/email.js +++ b/lib/models/email.js @@ -18,11 +18,11 @@ var properties = { * * **Properties** * - * - `to` - **{ String }** **required** - * - `from` - **{ String }** **required** - * - `subject` - **{ String }** **required** - * - `text` - **{ String }** - * - `html` - **{ String }** + * - `to` - String (required) + * - `from` - String (required) + * - `subject` - String (required) + * - `text` - String + * - `html` - String * * @class * @inherits {Model} @@ -35,19 +35,24 @@ var Email = module.exports = Model.extend('Email', properties); * * Example Options: * - * ```json + * ```js * { - * from: "Fred Foo ✔ ", // sender address + * from: "Fred Foo ", // sender address * to: "bar@blurdybloop.com, baz@blurdybloop.com", // list of receivers - * subject: "Hello ✔", // Subject line - * text: "Hello world ✔", // plaintext body - * html: "Hello world ✔" // html body + * subject: "Hello", // Subject line + * text: "Hello world", // plaintext body + * html: "Hello world" // html body * } * ``` * * See https://github.com/andris9/Nodemailer for other supported options. * - * @param {Object} options + * @options {Object} options See below + * @prop {String} from Senders's email address + * @prop {String} to List of one or more recipient email addresses (comma-delimited) + * @prop {String} subject Subject line + * @prop {String} text Body text + * @prop {String} html Body HTML (optional) * @param {Function} callback Called after the e-mail is sent or the sending failed */