mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-10 06:14:24 +00:00
Remove code dependencies to underscore
This commit is contained in:
parent
e86b922f40
commit
df19b3a8fb
@ -39,6 +39,7 @@ class NpmTimer{
|
||||
else{
|
||||
// otherwise, find our download complete measurement
|
||||
entry = utils.last(items.getEntries().filter(entry => entry.name === this._downloadComplete));
|
||||
|
||||
if(entry){
|
||||
strDuration = __('Finished downloading and installing {{packageName}} {{version}} in {{duration}}ms', {packageName: this._packageName, version: this._version, duration: entry.duration});
|
||||
performance.clearMarks();
|
||||
|
@ -447,6 +447,25 @@ function interceptLogs(consoleContext, logger) {
|
||||
};
|
||||
}
|
||||
|
||||
function compact(array) {
|
||||
return array.filter(n => n);
|
||||
}
|
||||
|
||||
function groupBy(array, key) {
|
||||
return array.reduce(function(rv, x) {
|
||||
(rv[x[key]] = rv[x[key]] || []).push(x);
|
||||
return rv;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function sample(array) {
|
||||
return array[Math.floor(Math.random() * array.length)];
|
||||
}
|
||||
|
||||
function last(array) {
|
||||
return array[array.length - 1];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
joinPath,
|
||||
dirname,
|
||||
|
12169
package-lock.json
generated
Normal file
12169
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user