Remove lodash flatten and flattenDeep

(re: #6087)
This commit is contained in:
Bryan Housel
2019-03-28 10:03:59 -04:00
parent f4367f96c0
commit d18b951c67
6 changed files with 55 additions and 39 deletions
+5
View File
@@ -47,6 +47,11 @@ describe('iD.utilArray', function() {
expect(iD.utilArrayChunk(a, 4)).to.eql([[1, 2, 3, 4], [5, 6, 7]]);
});
it('utilArrayFlatten returns two level array as single level', function() {
var a = [[1, 2, 3], [4, 5, 6], [7]];
expect(iD.utilArrayFlatten(a)).to.eql([1, 2, 3, 4, 5, 6, 7]);
});
describe('utilArrayGroupBy', function() {
var pets = [
{ type: 'Dog', name: 'Spot' },