mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Simplify _.omit and _.pick for the lodash underscore build.
Former-commit-id: 9a42c964ce4003bde1b4ce55f0f851141dbc9bb6
This commit is contained in:
@@ -639,6 +639,13 @@
|
||||
object = { 'fn': lodash.bind(function(x) { return this.x + x; }, { 'x': 1 }, 1) };
|
||||
equal(object.fn(), 2, '_.bind: ' + basename);
|
||||
|
||||
object = { 'a': 1, 'b': 2, 'c': 3 };
|
||||
var actual = lodash.omit(object, function(value) { return value == 3; });
|
||||
deepEqual(_.keys(actual).sort(), ['a', 'b', 'c'], '_.omit: ' + basename);
|
||||
|
||||
actual = lodash.pick(object, function(value) { return value != 3; });
|
||||
deepEqual(_.keys(actual), [], '_.pick: ' + basename);
|
||||
|
||||
ok(lodash.clone(array, true)[0] === array[0], '_.clone: ' + basename);
|
||||
start();
|
||||
});
|
||||
|
||||
@@ -1499,7 +1499,7 @@
|
||||
|
||||
equal(compiled(data), '1');
|
||||
});
|
||||
|
||||
|
||||
test('should work when passing `options.variable`', function() {
|
||||
var compiled = _.template(
|
||||
'<% _.forEach( data.a, function( value ) { %>' +
|
||||
|
||||
Reference in New Issue
Block a user