mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Rename getValue to result.
This commit is contained in:
@@ -165,13 +165,13 @@ $(document).ready(function() {
|
||||
strictEqual(tmpl(), '<p>\u2028\u2028\u2029\u2029</p>');
|
||||
});
|
||||
|
||||
test('getValue calls functions and returns primitives', function() {
|
||||
test('result calls functions and returns primitives', function() {
|
||||
var obj = {w: '', x: 'x', y: function(){ return 'y'; }};
|
||||
strictEqual(_.getValue(obj, 'w'), '');
|
||||
strictEqual(_.getValue(obj, 'x'), 'x');
|
||||
strictEqual(_.getValue(obj, 'y'), 'y');
|
||||
strictEqual(_.getValue(obj, 'z'), undefined);
|
||||
strictEqual(_.getValue(null, 'x'), null);
|
||||
strictEqual(_.result(obj, 'w'), '');
|
||||
strictEqual(_.result(obj, 'x'), 'x');
|
||||
strictEqual(_.result(obj, 'y'), 'y');
|
||||
strictEqual(_.result(obj, 'z'), undefined);
|
||||
strictEqual(_.result(null, 'x'), null);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user