Open phated opened 8 years ago
Current output of console.log
on node 0.10 - notice the [Getter/Setter]
{ dev: 16777220,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 42716293,
size: 798,
blocks: 8,
mode: [Getter/Setter],
atime: Tue Dec 08 2015 15:10:10 GMT-0700 (MST),
mtime: Tue Dec 08 2015 13:36:58 GMT-0700 (MST),
ctime: Tue Dec 08 2015 13:36:58 GMT-0700 (MST),
birthtime: Tue Dec 08 2015 15:10:10 GMT-0700 (MST) }
I would throw in as much info as possible, also info not available in some platforms if it's available.
Not sure of the intent of .inpect()
. If it's for humans, I would make all the keys more human readable. E.g. mtime
=> Modified
. Also as you mentioned, make mode
value visible.
Custom inspect methods are being deprecated in Node.js, this can be closed as won't fix.
@piranna they deprecated it in favor of a method attached at some Symbol. I think this needs to stay open.
I am thinking this should have a custom
inspect
method similar to Vinyl (https://github.com/gulpjs/vinyl/blob/master/index.js#L123-L142) but I'm not sure what information should be there.@contra @sindresorhus @piranna