Add lodash.prototype methods that return non-wrapped values.

Former-commit-id: b7ecb8c91ec9647827a80a297b966639c6580ef0
This commit is contained in:
John-David Dalton
2012-11-19 23:02:35 -08:00
parent 9d4618a223
commit bd4bff3b6b
5 changed files with 107 additions and 41 deletions

View File

@@ -697,8 +697,11 @@
object = lodash(1);
equal(object.clone() instanceof lodash, false, '_(...) wrapped values are not chainable by default: ' + basename);
equal(String(object) === '1', false, '_.prototype should not implement its own `toString` method: ' + basename);
equal(Number(object) === 1 , false, '_.prototype should not implement its own `valueOf` method: ' + basename);
equal(String(object) === '1', false, '_#toString should not be implemented: ' + basename);
equal(Number(object) === 1 , false, '_#valueOf should not be implemented: ' + basename);
object.chain();
equal(typeof object.has('x') == 'object', true, '_#has returns wrapped values when chaining: ' + basename);
start();
});