Add _.functionsIn and _.pairsIn.

This commit is contained in:
John-David Dalton
2015-10-27 00:45:32 -07:00
parent 6b2645b310
commit 557af10067
3 changed files with 95 additions and 15 deletions

View File

@@ -6041,7 +6041,7 @@
assert.deepEqual(_.functions(object).sort(), ['b', 'd']);
});
QUnit.test('should include inherited functions', function(assert) {
QUnit.test('should not include inherited functions', function(assert) {
assert.expect(1);
function Foo() {
@@ -6049,7 +6049,7 @@
this.b = 'b';
}
Foo.prototype.c = noop;
assert.deepEqual(_.functions(new Foo).sort(), ['a', 'c']);
assert.deepEqual(_.functions(new Foo).sort(), ['a']);
});
}());
@@ -21997,7 +21997,7 @@
var acceptFalsey = lodashStable.difference(allMethods, rejectFalsey);
QUnit.test('should accept falsey arguments', function(assert) {
assert.expect(263);
assert.expect(265);
var emptyArrays = lodashStable.map(falsey, lodashStable.constant([]));

View File

@@ -277,6 +277,9 @@
'assigning non-objects results in returning the non-object value',
'assigning undefined results in undefined'
],
'functions': [
'also looks up functions on the prototype'
],
'isEqual': [
'`0` is not equal to `-0`',
'Commutative equality is implemented for `0` and `-0`',