File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { ProgressPlugin } from 'webpack';
2
2
import env from 'std-env' ;
3
3
import prettyTime from 'pretty-time' ;
4
4
5
- import { startCase , shortenPath } from './utils' ;
5
+ import { startCase , shortenPath , objectValues } from './utils' ;
6
6
7
7
import * as reporters from './reporters' ; // eslint-disable-line import/no-namespace
8
8
import { parseRequest , hook } from './utils/webpack' ;
@@ -101,15 +101,15 @@ export default class WebpackBarPlugin extends ProgressPlugin {
101
101
}
102
102
103
103
get hasRunning ( ) {
104
- return Object . values ( this . states ) . some ( ( state ) => ! state . done ) ;
104
+ return objectValues ( this . states ) . some ( ( state ) => ! state . done ) ;
105
105
}
106
106
107
107
get hasErrors ( ) {
108
- return Object . values ( this . states ) . some ( ( state ) => state . hasErrors ) ;
108
+ return objectValues ( this . states ) . some ( ( state ) => state . hasErrors ) ;
109
109
}
110
110
111
111
get statesArray ( ) {
112
- return Object . values ( this . states ) . sort ( ( s1 , s2 ) =>
112
+ return objectValues ( this . states ) . sort ( ( s1 , s2 ) =>
113
113
s1 . name . localeCompare ( s2 . name )
114
114
) ;
115
115
}
Original file line number Diff line number Diff line change @@ -41,3 +41,7 @@ export function shortenPath(path = '') {
41
41
const cwd = process . cwd ( ) + sep ;
42
42
return path . replace ( cwd , '' ) ;
43
43
}
44
+
45
+ export function objectValues ( obj ) {
46
+ return Object . keys ( obj ) . map ( ( key ) => obj [ key ] ) ;
47
+ }
You can’t perform that action at this time.
0 commit comments