File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import format from 'format-io' ;
22import shortdate from 'shortdate' ;
33
4+ const { assign} = Object ;
5+ const { isArray} = Array ;
6+
47export default ( files ) => {
58 check ( files ) ;
69
@@ -11,7 +14,7 @@ export default (files) => {
1114} ;
1215
1316function check ( files ) {
14- if ( ! Array . isArray ( files ) )
17+ if ( ! isArray ( files ) )
1518 throw Error ( 'files should be an array!' ) ;
1619}
1720
@@ -20,7 +23,7 @@ function replaceDate(stat) {
2023 order : 'little' ,
2124 } ) ;
2225
23- return Object . assign ( stat , {
26+ return assign ( stat , {
2427 date,
2528 } ) ;
2629}
@@ -29,15 +32,15 @@ function replaceMode(stat) {
2932 const octal = Number ( stat . mode ) . toString ( 8 ) ;
3033 const mode = format . permissions . symbolic ( octal ) ;
3134
32- return Object . assign ( stat , {
35+ return assign ( stat , {
3336 mode,
3437 } ) ;
3538}
3639
3740function replaceSize ( stat ) {
3841 const size = format . size ( stat . size ) ;
3942
40- return Object . assign ( stat , {
43+ return assign ( stat , {
4144 size,
4245 } ) ;
4346}
You can’t perform that action at this time.
0 commit comments