PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/tags/jsdoc_toolkit-2.4.0/jsdoc-toolkit/app/test/multi_methods.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 25 lines | 5 code | 1 blank | 19 comment | 5 complexity | fba33081f40ca7b6fa7f8bc4c8789635 MD5 | raw file
 1
 2/**
 3	Get the entire flavor.
 4	@name flavor^3
 5	@function
 6	@returns {Object} The entire flavor hash.
 7*/
 8/**
 9	Get a named flavor.
10	@name flavor^2
11	@function
12	@param {String} name The name of the flavor to get.
13	@returns {String} The value of that flavor.
14*/
15/**
16	Set the flavor.
17	@param {String} name The name of the flavor to set.
18	@param {String} value The value of the flavor.
19	@returns {String} The value of that flavor.
20*/
21function flavor(name, value) {
22	if (arguments.length > 1) flavor[name] = value;
23	else if (arguments.length == 1) return flavor[name];
24	else return flavor;
25}