-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Rework Warning Logic (#538)
- Loading branch information
1 parent
817a0a8
commit bd847e6
Showing
11 changed files
with
274 additions
and
179 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
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
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,32 @@ | ||
import Ember from 'ember'; | ||
|
||
const { | ||
A: emberArray | ||
} = Ember; | ||
|
||
const A = emberArray(); | ||
|
||
export function callable(method) { | ||
return function(collection) { | ||
return A[method].apply(collection, arguments); | ||
}; | ||
} | ||
|
||
export const uniq = callable('uniq'); | ||
export const compact = callable('compact'); | ||
|
||
export function flatten(array = []) { | ||
let result = []; | ||
|
||
for (let i = 0, l = array.length; i < l; i++) { | ||
let item = array[i]; | ||
|
||
if (Array.isArray(item)) { | ||
result = result.concat(flatten(item)); | ||
} else { | ||
result.push(item); | ||
} | ||
} | ||
|
||
return result; | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.