Skip to content

Commit 49bb12b

Browse files
committed
chore: lint
1 parent c2404df commit 49bb12b

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

lib/formatify.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import format from 'format-io';
22
import shortdate from 'shortdate';
33

4+
const {assign} = Object;
5+
const {isArray} = Array;
6+
47
export default (files) => {
58
check(files);
69

@@ -11,7 +14,7 @@ export default (files) => {
1114
};
1215

1316
function 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

3740
function replaceSize(stat) {
3841
const size = format.size(stat.size);
3942

40-
return Object.assign(stat, {
43+
return assign(stat, {
4144
size,
4245
});
4346
}

0 commit comments

Comments
 (0)