Lines Matching refs:value

7  * array value.
10 * a default value is specified in |opt_default|.
14 * @param {Array=} opt_default The value to return if the key is not a bool.
15 * @return {Array} The |key| attribute value as an object.
18 var value = /** @type {Array} */ (dict[key]);
19 if (!(value instanceof Array)) {
22 ' (expected: array, actual: ' + typeof value + ')';
27 return value;
32 * boolean value.
35 * a default value is specified in |opt_default|.
39 * @param {boolean=} opt_default The value to return if the key is not a bool.
40 * @return {boolean} The |key| attribute value as a boolean.
43 var value = /** @type {boolean} */ (dict[key]);
44 if (typeof value != 'boolean') {
47 ' (expected: boolean, actual: ' + typeof value + ')';
52 return value;
57 * number value.
60 * a default value is specified in |opt_default|.
64 * @param {number=} opt_default The value to return if the key is not a number.
65 * @return {number} The |key| attribute value as a number.
68 var value = /** @type {number} */(dict[key]);
69 if (typeof value != 'number') {
72 ' (expected: number, actual: ' + typeof value + ')';
77 return value;
82 * object value.
85 * a default value is specified in |opt_default|.
89 * @param {Object=} opt_default The value to return if the key is not a bool.
90 * @return {Object} The |key| attribute value as an object.
93 var value = /** @type {Object} */ (dict[key]);
94 if (typeof value != 'object') {
97 ' (expected: object, actual: ' + typeof value + ')';
102 return value;
107 * string value.
110 * a default value is specified in |opt_default|.
114 * @param {string=} opt_default The value to return if the key is not a string.
115 * @return {string} The |key| attribute value as a string.
118 var value = /** @type {string} */ (dict[key]);
119 if (typeof value != 'string') {
122 ' (expected: string, actual: ' + typeof value + ')';
127 return value;
140 var value = /** @type {Object} */ JSON.parse(jsonString);
141 if (typeof value != 'object') {
142 throw 'Invalid data type (expected: Object, actual: ' + typeof value + ')';
144 return value;