Lines Matching refs:options
249 var options = {zero: 0, one: 1, empty: '', nan: NaN, nothing: null}; class in AnonymousFunction235956211300
251 _.defaults(options, {zero: 1, one: 10, twenty: 20, nothing: 'str'});
252 assert.equal(options.zero, 0, 'value exists');
253 assert.equal(options.one, 1, 'value exists');
254 assert.equal(options.twenty, 20, 'default applied');
255 assert.equal(options.nothing, null, "null isn't overridden");
257 _.defaults(options, {empty: 'full'}, {nan: 'nan'}, {word: 'word'}, {word: 'dog'});
258 assert.equal(options.empty, '', 'value exists');
259 assert.ok(_.isNaN(options.nan), "NaN isn't overridden");
260 assert.equal(options.word, 'word', 'new value is added, first one wins');
263 options = {};
264 _.defaults(options, null, void 0, {a: 1});
267 assert.equal(options.a, 1, 'should not error on `null` or `undefined` sources');