-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding shallow version for convenience
- Loading branch information
1 parent
1f97621
commit a6c1a5c
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var lib = require('./lib/deap'); | ||
|
||
var deap = module.exports = lib.extendShallow; | ||
|
||
deap(deap, { | ||
clone: lib.clone, | ||
extend: lib.extendShallow, | ||
merge: lib.mergeShallow | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var assert = require('chai').assert, | ||
lib = require('../lib/deap'), | ||
shallow = require('../shallow'); | ||
|
||
describe('shallow', function() { | ||
|
||
it('should be defined correctly', function() { | ||
assert.isFunction(shallow); | ||
|
||
assert.isFunction(shallow.extend); | ||
assert.isFunction(shallow.merge); | ||
assert.isFunction(shallow.clone); | ||
}); | ||
|
||
it('should be shallow functions', function() { | ||
assert.equal(shallow, lib.extendShallow); | ||
assert.equal(shallow.extend, lib.extendShallow); | ||
assert.equal(shallow.merge, lib.mergeShallow); | ||
assert.equal(shallow.clone, lib.clone); | ||
}); | ||
|
||
}); |